/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package triploa;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.rms.*;
import com.eightmotions.map.*;

import org.netbeans.microedition.util.SimpleCancellableTask;
import java.util.Date;
import java.util.Calendar;
import org.j4me.bluetoothgps.*;
import org.kxml2.io.KXmlParser;
/**
 * This is the main class for the midlet,provides to GUI
 * @author User
 */
import de.enough.polish.util.Locale;
import java.util.Vector;

public class MainMIDlet extends MIDlet implements CommandListener, LocationListener, ItemCommandListener {

    private boolean midletPaused = false;
    WebMethods w = null;
    SearchResult results = null;
    UserProfile profile = null;
    BTConnector bt = null;
    GPSReader gps = null;
    int userID=0;

    //<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
    private java.util.Hashtable __previousDisplayables = new java.util.Hashtable();
    private Command exitCommand;
    private Command doLoginCommand;
    private Command exitCommand1;
    private Command profileCMD;
    private Command logoutCMD;
    private Command offeredCMD;
    private Command searchCMD;
    private Command bookedCMD;
    private Command screenCommand;
    private Command viewMapCMD;
    private Command insertCMD;
    private Command profileUpdateCMD;
    private Command commitProfileCMD;
    private Command backCommand;
    private Command fromGpsCMD;
    private Command fromMapCMD;
    private Command doSearchCMD;
    private Command viewTravelCMD;
    private Command backCommand1;
    private Command toMapCMD;
    private Command toGpsCMD;
    private Command travelDetailsCMD;
    private Command cancelBookCMD;
    private Command userProfileCMD;
    private Command GoHomedirectly;
    private Command okCommand;
    private Command searchOnMapCMD;
    private Command bookCommand;
    private Command settingCMD;
    private Command goListHomeCMD;
    private Command offerCMD;
    private Command itemCommand1;
    private Command selectGPSCMD;
    private Command getunreadCMD;
    private Command replayCMD;
    private Command sendCMD;
    private Command getallMsgCMD;
    private Command getreadedCMD;
    private Command sendMsgCMD;
    private Command addFavoriteCMD;
    private Command sentCMD;
    private Command viewMsgCMD;
    private Command replayItemCommand;
    private Command itemCommand;
    private Command addFriendCMD;
    private Command removeFriendCMD;
    private Command banCMD;
    private Command viewBannedCMD;
    private Command unBanCommand;
    private Command backCommand2;
    private Command itemCommand2;
    private Command acceptFriendCMD;
    private Command denyFriendCMD;
    private Command friendshipCMD;
    private Command requestCMD;
    private Form loginForm;
    private TextField username;
    private TextField password;
    private ChoiceGroup choiceGroup;
    private StringItem stringItem;
    private ImageItem imageItem5;
    private Alert loginErrorAlert;
    private Form profileForm;
    private TextField usernameTextField;
    private TextField nameTextField;
    private TextField surnameTextField;
    private TextField bithTextField;
    private ChoiceGroup genderChoiceGroup;
    private TextField phoneTextField;
    private ChoiceGroup profileChoiceGroup;
    private ChoiceGroup smokerChoiceGroup;
    private TextField textField;
    private TextField ageTextField;
    private TextField emailTextField;
    private Form mapForm;
    private TextField cityTextField;
    private TextField stateTextField;
    private TextField addressTextField;
    private Form searchForm;
    private StringItem stringItem2;
    private TextField toTextField;
    private DateField fromDateField;
    private TextField fromTextField;
    private DateField toDateField;
    private List resultList;
    private Form travelForm;
    private StringItem fromStringItem;
    private StringItem toStringItem;
    private StringItem dateStringItem;
    private StringItem ownerStringItem;
    private StringItem seatStringItem;
    private ChoiceGroup choiceGroup1;
    private StringItem timeStringItem;
    private StringItem idStringItem;
    private List bookedtravel;
    private Form settingForm;
    private ChoiceGroup optionsGruop;
    private Form insertForm;
    private TextField insertToTextField;
    private DateField dateField1;
    private TextField insertFromTextField;
    private TextField freeSeatsTextField;
    private ChoiceGroup insertChoice;
    private TextField notesTextField;
    private TextField extimatedTextField;
    private DateField expirationDateField;
    private TextField deviationTextField;
    private TextField extimatedBudgetTextField;
    private ChoiceGroup vehicleChoiceGroup;
    private Alert waitScreen1;
    private List homeList;
    private Form detailForm;
    private StringItem stringItem1;
    private StringItem stringItem4;
    private StringItem stringItem3;
    private StringItem stringItem6;
    private StringItem stringItem5;
    private StringItem stringItem7;
    private ChoiceGroup detailsGroup;
    private StringItem stringItem11;
    private StringItem stringItem12;
    private StringItem stringItem9;
    private StringItem stringItem10;
    private StringItem stringItem8;
    private ChoiceGroup stagesChoiceGroup;
    private StringItem stringItem13;
    private StringItem stringItem14;
    private ChoiceGroup userChoiceGroup;
    private List bluetoothList;
    private Alert InformationAlert;
    private Form showMessageForm;
    private ChoiceGroup readedMsgList;
    private ChoiceGroup unreadedMsgList;
    private Form viewMsgForm;
    private StringItem textStringItem;
    private StringItem senderStringItem;
    private StringItem titleStringItem;
    private StringItem receiversStringItem;
    private Form msgForm;
    private TextField titleTextField;
    private TextField receiverdTextField;
    private TextField textTextField;
    private ChoiceGroup msgChoiceGroup;
    private List sentMsg;
    private Form bookForm;
    private TextField book1TextField;
    private TextField book3TextField;
    private TextField book2TextField;
    private List geoList;
    private Alert notificationAlert;
    private List friendList;
    private List bannedList;
    private List friendNotificationList;
    private List friendRequestList;
    private Form addFriendForm;
    private TextField friendTextField;
    private Font font;
    private Image image;
    private Image searchImage;
    private Image logoImage;
    private Image settingImage;
    private Image insertImage;
    private Image bookedImage;
    private Image profileImage;
    private Image offeredImage;
    private Image mapImage;
    private SimpleCancellableTask task;
    private Ticker ticker;
    //</editor-fold>//GEN-END:|fields|0|
    public List getResList() {
        return resultList;
    }

    /**
     * The MainMIDlet constructor.
     */
    public MainMIDlet() {
    }
    CacheManager cm = null;
    Options op = null;
    Travel t = null; //normally contains the last travel

    public void completedDiscovery() {
        String[] app = bt.getDeviceNames();
        for (int i = 0; i < app.length; i++) {
            this.getBluetoothList().append(app[i], null);
        }
    }

    public void showNotification(NotificationList list) 
    {
            if(list.results.size()>0){
                this.ShowMessage(Locale.get("NewNotification"));
            }
    }

    public void travelRemoved() {
        if(index>-1){
            this.results.getList().removeElementAt(index);
            this.getBookedtravel().delete(index);
        }
    }

    void bannedList(UserList l) {
        Vector v=l.results;
        banned=new Vector();
        List list=this.getBannedList();
        list.deleteAll();
                for(int i=0;i<v.size();i++)
        {
            UserProfile t=(UserProfile)v.elementAt(i);
           
                list.append(t.getUsername()+" "+Locale.get("FeedbackPoint")+" "+t.getFeedback(), null);
                banned.addElement(t);
        }
        this.switchDisplayable(null, list);
    }
Vector friendNoti=null,requestList=null;
    void friendShipNotification(UserList l) {
       Vector v=l.results;
        friendNoti=new Vector();
        List list=this.getFriendNotificationList();
        list.deleteAll();
                for(int i=0;i<v.size();i++)
        {
            UserProfile t=(UserProfile)v.elementAt(i);
           
                list.append(t.getUsername()+" "+Locale.get("FeedbackPoint")+" "+t.getFeedback(), null);
                friendNoti.addElement(t);
        }
        this.switchDisplayable(null, list);
    }

    void userRequestList(UserList l) {
       Vector v=l.results;
        requestList=new Vector();
        List list=this.getFriendNotificationList();
        list.deleteAll();
                for(int i=0;i<v.size();i++)
        {
            UserProfile t=(UserProfile)v.elementAt(i);
           
                list.append(t.getUsername()+" "+Locale.get("FeedbackPoint")+" "+t.getFeedback(), null);
                requestList.addElement(t);
        }
        this.switchDisplayable(null, list);
    }
    private void dateToString(Calendar c, StringBuffer fromDate, Date app) {
        if (app != null) {
            c.setTime(app);
            fromDate.append(c.get(c.YEAR));
            fromDate.append("-");
            int a = c.get(c.MONTH) + 1;
            if (a < 10) {
                fromDate.append("0");
            }
            fromDate.append(a);
            fromDate.append("-");
            a = c.get(c.DAY_OF_MONTH);
            if (a < 10) {
                fromDate.append("0");
            }
            fromDate.append(a);
            fromDate.append("T");
            a = c.get(c.HOUR_OF_DAY);
            if (a < 10) {
                fromDate.append("0");
            }
            fromDate.append(a);
            fromDate.append(":");
            a = c.get(c.MINUTE);
            if (a < 10) {
                fromDate.append("0");
            }
            fromDate.append(a);

            fromDate.append(":");
            a = c.get(c.SECOND);
            if (a < 10) {
                fromDate.append("0");
            }
            fromDate.append(a);
        }
    }
    //<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
    /**
     * Switches a display to previous displayable of the current displayable.
     * The <code>display</code> instance is obtain from the <code>getDisplay</code> method.
     */
    private void switchToPreviousDisplayable() {
        Displayable __currentDisplayable = getDisplay().getCurrent();
        if (__currentDisplayable != null) {
            Displayable __nextDisplayable = (Displayable) __previousDisplayables.get(__currentDisplayable);
            if (__nextDisplayable != null) {
                switchDisplayable(null, __nextDisplayable);
            }
        }
    }
    //</editor-fold>//GEN-END:|methods|0|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize ">//GEN-BEGIN:|0-initialize|0|0-preInitialize
    /**
     * Initilizes the application.
     * It is called only once when the MIDlet is started. The method is called before the <code>startMIDlet</code> method.
     */
    private void initialize() {//GEN-END:|0-initialize|0|0-preInitialize
        // write pre-initialize user code here

        sentCMD = new Command(Locale.get("GetSentMsg"), Command.ITEM, 0);//GEN-BEGIN:|0-initialize|1|0-postInitialize
        loginErrorAlert = new Alert(Locale.get("Failure"), Locale.get("LoginFailed"), null, AlertType.INFO);
        loginErrorAlert.setTimeout(Alert.FOREVER);//GEN-END:|0-initialize|1|0-postInitialize
    // write post-initialize user code here
    }//GEN-BEGIN:|0-initialize|2|
    //</editor-fold>//GEN-END:|0-initialize|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: startMIDlet ">//GEN-BEGIN:|3-startMIDlet|0|3-preAction
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Started point.
     */
    public void startMIDlet() {//GEN-END:|3-startMIDlet|0|3-preAction
        // write pre-action user code here
        w = new WebMethods(this);
        cm = new CacheManager();
        op = cm.getOptions();
        if (op.autoLogin) {
            if (op.savePassword && cm.loadLogin()) {
                switchDisplayable(getWaitScreen1(), null);
                try {
                    w.login(cm.getLoginUsername(), cm.getLoginPassword());
                } catch (Exception e) {
                    System.out.println(e);
                }
            } else {
                op.autoLogin = false;
            }
        }
        if (!op.autoLogin) {
            switchDisplayable(null, getLoginForm());//GEN-LINE:|3-startMIDlet|1|3-postAction
            if (op.savePassword) {
                System.out.println("Salvataggio password effettuata");
            }
            if (op.savePassword && cm.loadLogin()) {
                System.out.println("Entrato recupero username e password");
                username.setString(cm.getLoginUsername());
                password.setString(cm.getLoginPassword());
                this.choiceGroup.setSelectedIndex(0, true);
            }
        }
    // write post-action user code here
    }//GEN-BEGIN:|3-startMIDlet|2|
    //</editor-fold>//GEN-END:|3-startMIDlet|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: resumeMIDlet ">//GEN-BEGIN:|4-resumeMIDlet|0|4-preAction
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Resumed point.
     */
    public void resumeMIDlet() {//GEN-END:|4-resumeMIDlet|0|4-preAction
    // write pre-action user code here
//GEN-LINE:|4-resumeMIDlet|1|4-postAction
    // write post-action user code here
    }//GEN-BEGIN:|4-resumeMIDlet|2|
    //</editor-fold>//GEN-END:|4-resumeMIDlet|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable ">//GEN-BEGIN:|5-switchDisplayable|0|5-preSwitch
    /**
     * Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable.
     * @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately
     * @param nextDisplayable the Displayable to be set
     */
    public void switchDisplayable(Alert alert, Displayable nextDisplayable) {//GEN-END:|5-switchDisplayable|0|5-preSwitch
        // write pre-switch user code here
        Display display = getDisplay();//GEN-BEGIN:|5-switchDisplayable|1|5-postSwitch
        Displayable __currentDisplayable = display.getCurrent();
        if (__currentDisplayable != null  &&  nextDisplayable != null) {
            __previousDisplayables.put(nextDisplayable, __currentDisplayable);
        }
        if (alert == null) {
            display.setCurrent(nextDisplayable);
        } else {
            display.setCurrent(alert, nextDisplayable);
        }//GEN-END:|5-switchDisplayable|1|5-postSwitch
    // write post-switch user code here
    }//GEN-BEGIN:|5-switchDisplayable|2|
    //</editor-fold>//GEN-END:|5-switchDisplayable|2|
    int index;

    public void showTravel(Travel t) {
        this.getIdStringItem().setText("" + t.getID());
        this.getFromStringItem().setText(t.getFrom());
        this.getToStringItem().setText(t.getTo());
        this.getDateStringItem().setText(t.getDate());
        this.getOwnerStringItem().setText(t.getOwner());
        this.getTimeStringItem().setText(t.getTime());
        this.getSeatStringItem().setText("" + t.getFeedbacks());
    }
    String coord1=null,coord2=null;
    UserProfile upapp=null;
    //<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">//GEN-BEGIN:|7-commandAction|0|7-preCommandAction
    /**
     * Called by a system to indicated that a command has been invoked on a particular displayable.
     * @param command the Command that was invoked
     * @param displayable the Displayable where the command was invoked
     */
    public void commandAction(Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction
    try {// write pre-action user code here
        if (displayable == addFriendForm) {//GEN-BEGIN:|7-commandAction|1|496-preAction
            if (command == addFriendCMD) {//GEN-END:|7-commandAction|1|496-preAction
                // write pre-action user code here
                w.addFriend(IDSession, this.getFriendTextField().getString());
//GEN-LINE:|7-commandAction|2|496-postAction
                // write post-action user code here
            } else if (command == backCommand) {//GEN-LINE:|7-commandAction|3|494-preAction
                // write pre-action user code here
                switchDisplayable(null, getFriendList());//GEN-LINE:|7-commandAction|4|494-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|5|461-preAction
        } else if (displayable == bannedList) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|5|461-preAction
                // write pre-action user code here
                bannedListAction();//GEN-LINE:|7-commandAction|6|461-postAction
                // write post-action user code here
            } else if (command == backCommand) {//GEN-LINE:|7-commandAction|7|465-preAction
                // write pre-action user code here
                switchDisplayable(null, getFriendList());//GEN-LINE:|7-commandAction|8|465-postAction
                // write post-action user code here
            } else if (command == unBanCommand) {//GEN-LINE:|7-commandAction|9|468-preAction
                // write pre-action user code here
                index=getBannedList().getSelectedIndex();
                if(index>-1)
                {
                    upapp=(UserProfile)banned.elementAt(index);
                    w.unbanFriend(IDSession, ""+upapp.getId());
                }
//GEN-LINE:|7-commandAction|10|468-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|11|295-preAction
        } else if (displayable == bluetoothList) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|11|295-preAction
                    // write pre-action user code here
                bluetoothListAction();//GEN-LINE:|7-commandAction|12|295-postAction
                // write post-action user code here
            } else if (command == selectGPSCMD) {//GEN-LINE:|7-commandAction|13|298-preAction
                // write pre-action user code here
//GEN-LINE:|7-commandAction|14|298-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|15|449-preAction
        } else if (displayable == bookForm) {
            if (command == backCommand) {//GEN-END:|7-commandAction|15|449-preAction
                // write pre-action user code here
                switchDisplayable(null, getHomeList());//GEN-LINE:|7-commandAction|16|449-postAction
                // write post-action user code here
            } else if (command == bookCommand) {//GEN-LINE:|7-commandAction|17|451-preAction
                // write pre-action user code here
                String from,to;
                w.book(IDSession, ""+t.getID(), t.getFrom(),t.getTo() ,this.getBook2TextField().getString(),this.getBook1TextField().getString() , this.getBook3TextField().getString());
                switchDisplayable(getWaitScreen1(), getBookForm());//GEN-LINE:|7-commandAction|18|451-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|19|165-preAction
        } else if (displayable == bookedtravel) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|19|165-preAction
                    // write pre-action user code here
                bookedtravelAction();//GEN-LINE:|7-commandAction|20|165-postAction
                // write post-action user code here
            } else if (command == backCommand) {//GEN-LINE:|7-commandAction|21|172-preAction
                    // write pre-action user code here
                switchDisplayable(null, getHomeList());//GEN-LINE:|7-commandAction|22|172-postAction
                // write post-action user code here
            } else if (command == cancelBookCMD) {//GEN-LINE:|7-commandAction|23|171-preAction
                    // write pre-action user code here
                    index = this.getBookedtravel().getSelectedIndex();
                    this.t = (Travel) this.booked.getList().elementAt(index);
                    w.cancelBookedTrip(IDSession, "" + t.getID());
//GEN-LINE:|7-commandAction|24|171-postAction
                // write post-action user code here
            } else if (command == viewTravelCMD) {//GEN-LINE:|7-commandAction|25|167-preAction
                    // write pre-action user code here
                    index = this.getBookedtravel().getSelectedIndex();
                    this.t = (Travel) this.booked.getList().elementAt(index);
                    if (index != -1) {
                        showTravel(t);
                        switchDisplayable(null, getTravelForm());//GEN-LINE:|7-commandAction|26|167-postAction
                    // write post-action user code here
                    }
            }//GEN-BEGIN:|7-commandAction|27|455-preAction
        } else if (displayable == detailForm) {
            if (command == backCommand) {//GEN-END:|7-commandAction|27|455-preAction
                // write pre-action user code here
                switchDisplayable(null, getTravelForm());//GEN-LINE:|7-commandAction|28|455-postAction
                // write post-action user code here
            } else if (command == bookCommand) {//GEN-LINE:|7-commandAction|29|457-preAction
                // write pre-action user code here
                switchDisplayable(null, getBookForm());//GEN-LINE:|7-commandAction|30|457-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|31|421-preAction
        } else if (displayable == friendList) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|31|421-preAction
                // write pre-action user code here
                friendListAction();//GEN-LINE:|7-commandAction|32|421-postAction
                // write post-action user code here
            } else if (command == addFriendCMD) {//GEN-LINE:|7-commandAction|33|426-preAction
                // write pre-action user code here
                switchDisplayable(null, getAddFriendForm());//GEN-LINE:|7-commandAction|34|426-postAction
                // write post-action user code here
            } else if (command == backCommand) {//GEN-LINE:|7-commandAction|35|423-preAction
                // write pre-action user code here
                switchDisplayable(null, getHomeList());//GEN-LINE:|7-commandAction|36|423-postAction
                // write post-action user code here
            } else if (command == banCMD) {//GEN-LINE:|7-commandAction|37|430-preAction
                // write pre-action user code here
                index=getFriendList().getSelectedIndex();
                if(index>-1)
                {
                    upapp=(UserProfile)buddy.elementAt(index);
                    w.banFriend(IDSession, ""+upapp.getId());
                }
//GEN-LINE:|7-commandAction|38|430-postAction
                // write post-action user code here
            } else if (command == friendshipCMD) {//GEN-LINE:|7-commandAction|39|487-preAction
                // write pre-action user code here
                w.getUserFriendshipNotifications(IDSession);
                switchDisplayable(null, getWaitScreen1());//GEN-LINE:|7-commandAction|40|487-postAction
                // write post-action user code here
            } else if (command == removeFriendCMD) {//GEN-LINE:|7-commandAction|41|428-preAction
                // write pre-action user code here
                index=getFriendList().getSelectedIndex();
                if(index>-1)
                {
                    upapp=(UserProfile)buddy.elementAt(index);
                    w.removeFriend(IDSession, ""+upapp.getId());
                }
//GEN-LINE:|7-commandAction|42|428-postAction
                // write post-action user code here
            } else if (command == requestCMD) {//GEN-LINE:|7-commandAction|43|490-preAction
                // write pre-action user code here
                w.getUserFriendshipRequests(IDSession);
                switchDisplayable(null, getWaitScreen1());//GEN-LINE:|7-commandAction|44|490-postAction
                // write post-action user code here
            } else if (command == viewBannedCMD) {//GEN-LINE:|7-commandAction|45|432-preAction
                // write pre-action user code here
                w.getBannedList(IDSession);
//GEN-LINE:|7-commandAction|46|432-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|47|470-preAction
        } else if (displayable == friendNotificationList) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|47|470-preAction
                // write pre-action user code here
                friendNotificationListAction();//GEN-LINE:|7-commandAction|48|470-postAction
                // write post-action user code here
            } else if (command == acceptFriendCMD) {//GEN-LINE:|7-commandAction|49|483-preAction
                // write pre-action user code here
                index=this.getFriendNotificationList().getSelectedIndex();
                if(index>-1)
                {
                    upapp=(UserProfile)friendNoti.elementAt(index);
                    w.acceptFriendshipRequest(IDSession, ""+upapp.getId());
                }
//GEN-LINE:|7-commandAction|50|483-postAction
                // write post-action user code here
            } else if (command == backCommand) {//GEN-LINE:|7-commandAction|51|480-preAction
                // write pre-action user code here
                switchDisplayable(null, getFriendList());//GEN-LINE:|7-commandAction|52|480-postAction
                // write post-action user code here
            } else if (command == denyFriendCMD) {//GEN-LINE:|7-commandAction|53|485-preAction
                // write pre-action user code here
                index=this.getFriendNotificationList().getSelectedIndex();
                if(index>-1)
                {
                    upapp=(UserProfile)friendNoti.elementAt(index);
                    w.denyFriendshipRequest(IDSession, ""+upapp.getId());
                }
//GEN-LINE:|7-commandAction|54|485-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|55|473-preAction
        } else if (displayable == friendRequestList) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|55|473-preAction
                // write pre-action user code here
                friendRequestListAction();//GEN-LINE:|7-commandAction|56|473-postAction
                // write post-action user code here
            } else if (command == backCommand) {//GEN-LINE:|7-commandAction|57|475-preAction
                // write pre-action user code here
                switchDisplayable(null, getFriendList());//GEN-LINE:|7-commandAction|58|475-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|59|435-preAction
        } else if (displayable == geoList) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|59|435-preAction
                // write pre-action user code here
                geoListAction();//GEN-LINE:|7-commandAction|60|435-postAction
                // write post-action user code here
            } else if (command == itemCommand) {//GEN-LINE:|7-commandAction|61|438-preAction
                // write pre-action user code here
                Form f=null;
                    if(w.vecchio>0)
                    {
                        if (w.vecchio == w.SEARCH) 
                        {
                            f=this.getSearchForm();
                        }
                        if (w.vecchio == w.INSERT) 
                        {
                            f=this.getInsertForm();
                        }if (w.vecchio == w.BOOK) 
                        {
                            f=this.getBookForm();
                        }
                        
                    }else f=this.getMapForm();
                if(geoList.getSelectedIndex()>0)
                {
                    w.setLocazione(geoList.getSelectedIndex()-1);
                    
                }else this.switchDisplayable(null, f);
                
//GEN-LINE:|7-commandAction|62|438-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|63|280-preAction
        } else if (displayable == homeList) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|63|280-preAction
                    // write pre-action user code here
                homeListAction();//GEN-LINE:|7-commandAction|64|280-postAction
                // write post-action user code here
            } else if (command == exitCommand) {//GEN-LINE:|7-commandAction|65|289-preAction
                    // write pre-action user code here
                exitMIDlet();//GEN-LINE:|7-commandAction|66|289-postAction
                // write post-action user code here
            } else if (command == logoutCMD) {//GEN-LINE:|7-commandAction|67|284-preAction
                    // write pre-action user code here
                switchDisplayable(null, getLoginForm());//GEN-LINE:|7-commandAction|68|284-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|69|268-preAction
        } else if (displayable == insertForm) {
            if (command == backCommand) {//GEN-END:|7-commandAction|69|268-preAction
                    // write pre-action user code here
                switchDisplayable(null, getHomeList());//GEN-LINE:|7-commandAction|70|268-postAction
                // write post-action user code here
            } else if (command == fromGpsCMD) {//GEN-LINE:|7-commandAction|71|264-preAction
                // write pre-action user code here
//GEN-LINE:|7-commandAction|72|264-postAction
                // write post-action user code here
            } else if (command == fromMapCMD) {//GEN-LINE:|7-commandAction|73|263-preAction
                    // write pre-action user code here
                    mode = 2;
                    switchDisplayable(null, getMapForm());//GEN-LINE:|7-commandAction|74|263-postAction
                // write post-action user code here
            } else if (command == offerCMD) {//GEN-LINE:|7-commandAction|75|260-preAction
                    // write pre-action user code here
                
                    Vehicle v=(Vehicle)veicoli.elementAt(this.getVehicleChoiceGroup().getSelectedIndex());
                    Date app = this.getDateField1().getDate();
                    Calendar c = Calendar.getInstance();
                    StringBuffer fromDate = new StringBuffer();
                    StringBuffer expirationDate = new StringBuffer();
                    int seats=Integer.parseInt(this.getFreeSeatsTextField().getString());
                    if(seats<=v.getSeats()||v.getSeats()==0&&seats>=0){
                    dateToString(c, fromDate, app);
                    dateToString(c,expirationDate,this.getExpirationDateField().getDate());
                    boolean smokers=this.getInsertChoice().isSelected(1);
                    boolean license=this.getInsertChoice().isSelected(0);
                    boolean freq=this.getInsertChoice().isSelected(2);
                    boolean draft=this.getInsertChoice().isSelected(3);
                    w.insert(IDSession, this.getInsertFromTextField().getString(), this.getInsertToTextField().getString(), fromDate.toString(), this.getFreeSeatsTextField().getString(),this.getNotesTextField().getString(),this.getDeviationTextField().getString(),-1,v.getId(),v.getVehicleClass(),freq,this.getExtimatedTextField().getString(),this.getExtimatedBudgetTextField().getString(),draft,expirationDate.toString(),license,smokers);
                    
                    }else
                    ShowError(Locale.get("ErrorSeats"));
//GEN-LINE:|7-commandAction|76|260-postAction
                // write post-action user code here
            } else if (command == toGpsCMD) {//GEN-LINE:|7-commandAction|77|266-preAction
                // write pre-action user code here
//GEN-LINE:|7-commandAction|78|266-postAction
                // write post-action user code here
            } else if (command == toMapCMD) {//GEN-LINE:|7-commandAction|79|265-preAction
                    // write pre-action user code here
                    mode = 3;
                    switchDisplayable(null, getMapForm());//GEN-LINE:|7-commandAction|80|265-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|81|26-preAction
        } else if (displayable == loginForm) {
            if (command == doLoginCommand) {//GEN-END:|7-commandAction|81|26-preAction
                    // write pre-action user code here  
                    if (choiceGroup.isSelected(0)) {
                        System.out.println("Salvataggio password");
                        op.savePassword = true;
                        cm.setOptions(op);
                        cm.setLogin(username.getString(), password.getString());
                    }
                    switchDisplayable(null, getWaitScreen1());//GEN-LINE:|7-commandAction|82|26-postAction

                    w.login(username.getString(), password.getString());
                // write post-action user code here
            } else if (command == exitCommand) {//GEN-LINE:|7-commandAction|83|19-preAction
                    // write pre-action user code here
                exitMIDlet();//GEN-LINE:|7-commandAction|84|19-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|85|195-preAction
        } else if (displayable == mapForm) {
            if (command == backCommand1) {//GEN-END:|7-commandAction|85|195-preAction
                    // write pre-action user code here
                switchDisplayable(null, getHomeList());//GEN-LINE:|7-commandAction|86|195-postAction
                // write post-action user code here
            } else if (command == searchOnMapCMD) {//GEN-LINE:|7-commandAction|87|194-preAction
                    // write pre-action user code here
//GEN-LINE:|7-commandAction|88|194-postAction
                    w.getMapPoint(IDSession, stateTextField.getString(), cityTextField.getString(), addressTextField.getString());
            }//GEN-BEGIN:|7-commandAction|89|371-preAction
        } else if (displayable == msgForm) {
            if (command == backCommand) {//GEN-END:|7-commandAction|89|371-preAction
                    // write pre-action user code here
                switchDisplayable(null, getViewMsgForm());//GEN-LINE:|7-commandAction|90|371-postAction
                // write post-action user code here
            } else if (command == sendMsgCMD) {//GEN-LINE:|7-commandAction|91|374-preAction
                // write pre-action user code here
                switchDisplayable(getWaitScreen1(), getMsgForm());//GEN-LINE:|7-commandAction|92|374-postAction

                w.sendMessage(IDSession, this.getReceiverdTextField().getString(), this.getTitleTextField().getString(), this.getTextTextField().getString(), this.getMsgChoiceGroup().isSelected(0));
            }//GEN-BEGIN:|7-commandAction|93|90-preAction
        } else if (displayable == profileForm) {
            if (command == backCommand) {//GEN-END:|7-commandAction|93|90-preAction
                    // write pre-action user code here
                switchToPreviousDisplayable();//GEN-LINE:|7-commandAction|94|90-postAction
               
            }else if(command== viewMapCMD)
                {
                     
                //m.map.gotoLonLat(henson.midp.Float.parse("-122.416",10),henson.midp.Float.parse("37.802",10) ,4,false);
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|95|136-preAction
        } else if (displayable == resultList) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|95|136-preAction
                // write pre-action user code here
                resultListAction();//GEN-LINE:|7-commandAction|96|136-postAction
                // write post-action user code here
            } else if (command == backCommand) {//GEN-LINE:|7-commandAction|97|145-preAction
                // write pre-action user code here
                    resultList.deleteAll();
                    switchDisplayable(null, getSearchForm());//GEN-LINE:|7-commandAction|98|145-postAction
                    
                    // write post-action user code here
            } else if (command == viewTravelCMD) {//GEN-LINE:|7-commandAction|99|140-preAction
                // write pre-action user code here
                    index=resultList.getSelectedIndex();
                    if(index!=-1){
                    t=(Travel)results.getList().elementAt(index);
                    showTravel(t);
                    switchDisplayable(null, getTravelForm());//GEN-LINE:|7-commandAction|100|140-postAction
                    }
                    // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|101|142-preAction
        } else if (displayable == searchForm) {
            if (command == backCommand1) {//GEN-END:|7-commandAction|101|142-preAction
                // write pre-action user code here
                switchDisplayable(null, getHomeList());//GEN-LINE:|7-commandAction|102|142-postAction
                // write post-action user code here
            } else if (command == doSearchCMD) {//GEN-LINE:|7-commandAction|103|123-preAction
                // write pre-action user code here
                switchDisplayable(null, getResultList());//GEN-LINE:|7-commandAction|104|123-postAction
                    Date app=this.getFromDateField().getDate();
                    Calendar c=Calendar.getInstance();
                    StringBuffer fromDate=new StringBuffer(),toDate=new StringBuffer() ;
                    if(app!=null)
                    {
                        c.setTime(app);
                        fromDate.append(c.get(c.YEAR));
                        fromDate.append("-");
                        int a=c.get(c.MONTH)+1;
                        if(a<10)
                        {
                            fromDate.append("0");
                        }
                        fromDate.append(a);
                        fromDate.append("-");
                        a=c.get(c.DAY_OF_MONTH);
                        if(a<10)
                        {
                            fromDate.append("0");
                        }
                        fromDate.append(a);
                    }
                    app=this.getToDateField().getDate();
                    if(app!=null)
                    {
                        c.setTime(app);
                        toDate.append(c.get(c.YEAR));
                        toDate.append("-");
                        int a=c.get(c.MONTH)+1;
                        if(a<10)
                        {
                            toDate.append("0");
                        }
                        toDate.append(a);
                        toDate.append("-");
                        a=c.get(c.DAY_OF_MONTH);
                        if(a<10)
                        {
                            toDate.append("0");
                        }
                        toDate.append(a);
                    }
                    w.search(IDSession,this.getFromTextField().getString(),this.getToTextField().getString(),fromDate.toString(), 0, 10,toDate.toString());
                
                // write post-action user code here
            } else if (command == fromGpsCMD) {//GEN-LINE:|7-commandAction|105|127-preAction
                // write pre-action user code here
//GEN-LINE:|7-commandAction|106|127-postAction
                // write post-action user code here
            } else if (command == fromMapCMD) {//GEN-LINE:|7-commandAction|107|125-preAction
                // write pre-action user code here
                    mode=0;
                    switchDisplayable(null, getMapForm());//GEN-LINE:|7-commandAction|108|125-postAction
                // write post-action user code here
            } else if (command == toGpsCMD) {//GEN-LINE:|7-commandAction|109|131-preAction
                // write pre-action user code here
//GEN-LINE:|7-commandAction|110|131-postAction
                // write post-action user code here
            } else if (command == toMapCMD) {//GEN-LINE:|7-commandAction|111|129-preAction
                // write pre-action user code here
                    mode=1;
                    switchDisplayable(null, getMapForm());//GEN-LINE:|7-commandAction|112|129-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|113|414-preAction
        } else if (displayable == sentMsg) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|113|414-preAction
                // write pre-action user code here
                sentMsgAction();//GEN-LINE:|7-commandAction|114|414-postAction
                // write post-action user code here
            } else if (command == backCommand) {//GEN-LINE:|7-commandAction|115|416-preAction
                // write pre-action user code here
                switchDisplayable(null, getShowMessageForm());//GEN-LINE:|7-commandAction|116|416-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|117|206-preAction
        } else if (displayable == settingForm) {
            if (command == backCommand) {//GEN-END:|7-commandAction|117|206-preAction
                    // write pre-action user code here
                switchToPreviousDisplayable();//GEN-LINE:|7-commandAction|118|206-postAction
                    // write post-action user code here
            } else if (command == okCommand) {//GEN-LINE:|7-commandAction|119|208-preAction
                    // write pre-action user code here
                    op.autoLogin=optionsGruop.isSelected(0);
                    op.savePassword=optionsGruop.isSelected(1);
                    cm.setOptions(op);
                    switchDisplayable(null, getHomeList());//GEN-LINE:|7-commandAction|120|208-postAction
                    // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|121|341-preAction
        } else if (displayable == showMessageForm) {
            if (command == backCommand) {//GEN-END:|7-commandAction|121|341-preAction
                    // write pre-action user code here
                switchDisplayable(null, getHomeList());//GEN-LINE:|7-commandAction|122|341-postAction
                    // write post-action user code here
            } else if (command == getallMsgCMD) {//GEN-LINE:|7-commandAction|123|348-preAction
                    // write pre-action user code here
                    switchDisplayable(null, getWaitScreen1());                                            
                    this.waitScreen1.setString("Waiting connection");
                    
                    w.getMessages(IDSession,""+userID,0,40);
//GEN-LINE:|7-commandAction|124|348-postAction
                    // write post-action user code here
            } else if (command == getunreadCMD) {//GEN-LINE:|7-commandAction|125|344-preAction
                    // write pre-action user code here
                    w.getUnreadMessages(IDSession,""+userID);
//GEN-LINE:|7-commandAction|126|344-postAction
                    // write post-action user code here
            } else if (command == sendCMD) {//GEN-LINE:|7-commandAction|127|350-preAction
                    // write pre-action user code here
                switchDisplayable(null, getMsgForm());//GEN-LINE:|7-commandAction|128|350-postAction
                    // write post-action user code here
            } else if (command == sentCMD) {//GEN-LINE:|7-commandAction|129|354-preAction
                    // write pre-action user code here
                    
                switchDisplayable(null, getWaitScreen1());//GEN-LINE:|7-commandAction|130|354-postAction
                    w.getSentMessages(IDSession,""+userID,0,40);
            } else if (command == viewMsgCMD) {//GEN-LINE:|7-commandAction|131|356-preAction
                    // write pre-action user code here
                    boolean b[]=new boolean[this.getUnreadedMsgList().size()];
                    this.getUnreadedMsgList().getSelectedFlags(b);
                    index=-1;
                    for(int i=0;i<b.length;i++)
                    {
                        if(b[i]){ index=i; break;}
                    }
                    System.out.println("Messaggio non letto selezionato "+index);
                    Message m=null;
                   if(index!=-1)
                   {
                       m=(Message)this.unread.elementAt(index);
                       w.setReadMessage(IDSession, m.getUserId());
                   }
                   else
                    {
                        b=new boolean[this.getReadedMsgList().size()];
                    this.getReadedMsgList().getSelectedFlags(b);
                    index=-1;
                    for(int i=0;i<b.length;i++)
                    {
                        if(b[i]){ index=i; break;}
                    }
                        System.out.println("Messaggio letto selezionato "+index);
                        if(index!=-1){
                           m=(Message)this.readed.elementAt(index);
                        }
                    }
                    
                     if(m!=null){
                         System.out.println("Messaggio selezionato ");
                         showMessage(m);
                         switchDisplayable(null, getViewMsgForm());//GEN-LINE:|7-commandAction|132|356-postAction
                     
                    }else System.out.println("Nussun Messaggio selezionato "+index);// write post-action user code here
            }//GEN-BEGIN:|7-commandAction|133|358-preAction
        } else if (displayable == travelForm) {
            if (command == addFavoriteCMD) {//GEN-END:|7-commandAction|133|358-preAction
                    // write pre-action user code here
                    //switchDisplayable(null, getWaitScreen1());
                    w.addToFavorite(this.IDSession, ""+t.getID());
//GEN-LINE:|7-commandAction|134|358-postAction
                    // write post-action user code here
            } else if (command == backCommand1) {//GEN-LINE:|7-commandAction|135|162-preAction
                    // write pre-action user code here
                switchDisplayable(null, getResultList());//GEN-LINE:|7-commandAction|136|162-postAction
                    // write post-action user code here
            } else if (command == bookCommand) {//GEN-LINE:|7-commandAction|137|212-preAction
                    // write pre-action user code here
                    //w.book(IDSession, this.getIdStringItem().getText());
                switchDisplayable(null, getBookForm());//GEN-LINE:|7-commandAction|138|212-postAction
                    // write post-action user code here
            } else if (command == travelDetailsCMD) {//GEN-LINE:|7-commandAction|139|159-preAction
                    // write pre-action user code here
                switchDisplayable(null, getWaitScreen1());//GEN-LINE:|7-commandAction|140|159-postAction
                    w.getDetailedInfo(this.IDSession, t.getID());
                    // write post-action user code here
            } else if (command == userProfileCMD) {//GEN-LINE:|7-commandAction|141|161-preAction
                    // write pre-action user code here
                profile=null;
                switchDisplayable(getWaitScreen1(), getTravelForm());//GEN-LINE:|7-commandAction|142|161-postAction
                w.getProfile(IDSession, ""+t.getUserId());
            }//GEN-BEGIN:|7-commandAction|143|382-preAction
        } else if (displayable == viewMsgForm) {
            if (command == backCommand) {//GEN-END:|7-commandAction|143|382-preAction
                    // write pre-action user code here
                switchToPreviousDisplayable();//GEN-LINE:|7-commandAction|144|382-postAction
                    // write post-action user code here
            } else if (command == replayItemCommand) {//GEN-LINE:|7-commandAction|145|385-preAction
                    // write pre-action user code here
                    this.getReceiverdTextField().setString(this.getSenderStringItem().getText());
                    this.getTitleTextField().setString("Re:"+this.getTitleStringItem().getText());
                    switchDisplayable(null, getMsgForm());//GEN-LINE:|7-commandAction|146|385-postAction
                    // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|147|275-preAction
        } else if (displayable == waitScreen1) {
            if (command == backCommand) {//GEN-END:|7-commandAction|147|275-preAction
                    // write pre-action user code here
                switchDisplayable(null, getLoginForm());//GEN-LINE:|7-commandAction|148|275-postAction
                    // write post-action user code here
            } else if (command == settingCMD) {//GEN-LINE:|7-commandAction|149|276-preAction
                    // write pre-action user code here
                switchDisplayable(null, getSettingForm());//GEN-LINE:|7-commandAction|150|276-postAction
                    // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|151|7-postCommandAction
        }//GEN-END:|7-commandAction|151|7-postCommandAction
            else if (displayable == m) {
                if (command == backCommand) {
                // write pre-action user code here
                    m.stopZooming();
                    switchDisplayable(null, this.mapForm);
                }
                if (command == helpCommand) {
                // write pre-action user code here
                   this.ShowMessage(Locale.get("HelpMap"));
                }
                if(command==savePosition)
                {
                    lat=m.getLat();
                    lon=m.getLon();
                    switch(mode)
                    {
                        case 0://SEARCH from
                            this.getFromTextField().setString(lat+","+lon);
                            
                    switchDisplayable(null, this.getSearchForm());
                            break;
                        case 1: //search to
                            this.getToTextField().setString(lat+","+lon);
                            switchDisplayable(null, this.getSearchForm());
                            break;
                        case 2://insert from
                            this.getInsertFromTextField().setString(lat+","+lon);
                            switchDisplayable(null, this.getInsertForm());
                            break;
                        case 3: //insert to
                            this.getInsertToTextField().setString(lat+","+lon);
                            switchDisplayable(null, this.getInsertForm());
                            break;
                    }
                    mode=-1;
                }
            }
        }catch(LOAException e)
        {
            ShowError(Locale.get("Error") + " " + e.getMessage());
        }// write post-action user code here
    }//GEN-BEGIN:|7-commandAction|152|
    //</editor-fold>//GEN-END:|7-commandAction|152|





int mode=-1;
float lat=0,lon=0;



//<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand ">//GEN-BEGIN:|18-getter|0|18-preInit
/**
 * Returns an initiliazed instance of exitCommand component.
 * @return the initialized component instance
 */
public Command getExitCommand() {
    if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit
            // write pre-init user code here
        exitCommand = new Command(Locale.get("Exit"), Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit
            // write post-init user code here
    }//GEN-BEGIN:|18-getter|2|
    return exitCommand;
}
//</editor-fold>//GEN-END:|18-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: loginForm ">//GEN-BEGIN:|14-getter|0|14-preInit
/**
 * Returns an initiliazed instance of loginForm component.
 * @return the initialized component instance
 */
public Form getLoginForm() {
    if (loginForm == null) {//GEN-END:|14-getter|0|14-preInit
            // write pre-init user code here
            
        loginForm = new Form(Locale.get("Login"), new Item[] { getImageItem5(), getStringItem(), getUsername(), getPassword(), getChoiceGroup() });//GEN-BEGIN:|14-getter|1|14-postInit
        loginForm.addCommand(getExitCommand());
        loginForm.addCommand(getDoLoginCommand());
        loginForm.setCommandListener(this);//GEN-END:|14-getter|1|14-postInit
            
            // write post-init user code here
    }//GEN-BEGIN:|14-getter|2|
    return loginForm;
}
//</editor-fold>//GEN-END:|14-getter|2|

MapCanvas m=null;
public void showMessage(Message m)
{
    this.getSenderStringItem().setText(m.getSender());
                         this.getReceiversStringItem().setText(m.getReceivers());
                         this.getTitleStringItem().setText(m.getTitle());
                         this.getTextStringItem().setText(m.getText());
}
public void showMap(float lat,float lon)
{
    if(m==null){
                m=new MapCanvas();
                m.init();
                m.addCommand(this.getBackCommand());
                m.addCommand(this.getHelpCommand());
                m.addCommand(getSavePosition());
                m.setCommandListener(this);
    }
                switchDisplayable (null, m);
                System.out.println(lat+" , "+lon);
                m.gotoLonLat(lon,lat ,2,false);
                //m.run();
                m.repaint();
}

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: doLoginCommand ">//GEN-BEGIN:|25-getter|0|25-preInit
/**
 * Returns an initiliazed instance of doLoginCommand component.
 * @return the initialized component instance
 */
public Command getDoLoginCommand() {
    if (doLoginCommand == null) {//GEN-END:|25-getter|0|25-preInit
            // write pre-init user code here
        doLoginCommand = new Command(Locale.get("Login"), Command.ITEM, 1);//GEN-LINE:|25-getter|1|25-postInit
            // write post-init user code here
    }//GEN-BEGIN:|25-getter|2|
    return doLoginCommand;
}
//</editor-fold>//GEN-END:|25-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: username ">//GEN-BEGIN:|21-getter|0|21-preInit
/**
 * Returns an initiliazed instance of username component.
 * @return the initialized component instance
 */
public TextField getUsername() {
    if (username == null) {//GEN-END:|21-getter|0|21-preInit
            // write pre-init user code here
        username = new TextField(Locale.get("Username"), null, 32, TextField.ANY);//GEN-LINE:|21-getter|1|21-postInit
            // write post-init user code here
    }//GEN-BEGIN:|21-getter|2|
    return username;
}
//</editor-fold>//GEN-END:|21-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: password ">//GEN-BEGIN:|22-getter|0|22-preInit
/**
 * Returns an initiliazed instance of password component.
 * @return the initialized component instance
 */
public TextField getPassword() {
    if (password == null) {//GEN-END:|22-getter|0|22-preInit
            // write pre-init user code here
        password = new TextField(Locale.get("Password"), null, 32, TextField.ANY | TextField.PASSWORD);//GEN-LINE:|22-getter|1|22-postInit
            // write post-init user code here
    }//GEN-BEGIN:|22-getter|2|
    return password;
}
//</editor-fold>//GEN-END:|22-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: choiceGroup ">//GEN-BEGIN:|27-getter|0|27-preInit
/**
 * Returns an initiliazed instance of choiceGroup component.
 * @return the initialized component instance
 */
public ChoiceGroup getChoiceGroup() {
    if (choiceGroup == null) {//GEN-END:|27-getter|0|27-preInit
            // write pre-init user code here
        choiceGroup = new ChoiceGroup("", Choice.MULTIPLE);//GEN-BEGIN:|27-getter|1|27-postInit
        choiceGroup.append(Locale.get("Save"), null);
        choiceGroup.setSelectedFlags(new boolean[] { false });
        choiceGroup.setFont(0, null);//GEN-END:|27-getter|1|27-postInit
            // write post-init user code here
    }//GEN-BEGIN:|27-getter|2|
    return choiceGroup;
}
//</editor-fold>//GEN-END:|27-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem ">//GEN-BEGIN:|29-getter|0|29-preInit
/**
 * Returns an initiliazed instance of stringItem component.
 * @return the initialized component instance
 */
public StringItem getStringItem() {
    if (stringItem == null) {//GEN-END:|29-getter|0|29-preInit
            // write pre-init user code here
        stringItem = new StringItem("", Locale.get("LoginMessage"), Item.PLAIN);//GEN-BEGIN:|29-getter|1|29-postInit
        stringItem.setLayout(ImageItem.LAYOUT_CENTER | ImageItem.LAYOUT_NEWLINE_AFTER | Item.LAYOUT_VEXPAND);
        stringItem.setFont(getFont());//GEN-END:|29-getter|1|29-postInit
            // write post-init user code here
    }//GEN-BEGIN:|29-getter|2|
    return stringItem;
}
//</editor-fold>//GEN-END:|29-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: font ">//GEN-BEGIN:|30-getter|0|30-preInit
/**
 * Returns an initiliazed instance of font component.
 * @return the initialized component instance
 */
public Font getFont() {
    if (font == null) {//GEN-END:|30-getter|0|30-preInit
            // write pre-init user code here
        font = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM);//GEN-LINE:|30-getter|1|30-postInit
            // write post-init user code here
    }//GEN-BEGIN:|30-getter|2|
    return font;
}
//</editor-fold>//GEN-END:|30-getter|2|



//<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand1 ">//GEN-BEGIN:|38-getter|0|38-preInit
/**
 * Returns an initiliazed instance of exitCommand1 component.
 * @return the initialized component instance
 */
public Command getExitCommand1() {
    if (exitCommand1 == null) {//GEN-END:|38-getter|0|38-preInit
            // write pre-init user code here
        exitCommand1 = new Command(LocalizationSupport.getMessage("Exit"), Command.EXIT, 1);//GEN-LINE:|38-getter|1|38-postInit
            // write post-init user code here
    }//GEN-BEGIN:|38-getter|2|
    return exitCommand1;
}
//</editor-fold>//GEN-END:|38-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: logoutCMD ">//GEN-BEGIN:|41-getter|0|41-preInit
/**
 * Returns an initiliazed instance of logoutCMD component.
 * @return the initialized component instance
 */
public Command getLogoutCMD() {
    if (logoutCMD == null) {//GEN-END:|41-getter|0|41-preInit
            // write pre-init user code here
        logoutCMD = new Command(Locale.get("Logout"), Command.ITEM, 0);//GEN-LINE:|41-getter|1|41-postInit
            // write post-init user code here
    }//GEN-BEGIN:|41-getter|2|
    return logoutCMD;
}
//</editor-fold>//GEN-END:|41-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: profileCMD ">//GEN-BEGIN:|43-getter|0|43-preInit
/**
 * Returns an initiliazed instance of profileCMD component.
 * @return the initialized component instance
 */
public Command getProfileCMD() {
    if (profileCMD == null) {//GEN-END:|43-getter|0|43-preInit
            // write pre-init user code here
        profileCMD = new Command(LocalizationSupport.getMessage("ViewProfile"), Command.ITEM, 0);//GEN-LINE:|43-getter|1|43-postInit
            // write post-init user code here
    }//GEN-BEGIN:|43-getter|2|
    return profileCMD;
}
//</editor-fold>//GEN-END:|43-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: searchCMD ">//GEN-BEGIN:|45-getter|0|45-preInit
/**
 * Returns an initiliazed instance of searchCMD component.
 * @return the initialized component instance
 */
public Command getSearchCMD() {
    if (searchCMD == null) {//GEN-END:|45-getter|0|45-preInit
            // write pre-init user code here
        searchCMD = new Command(LocalizationSupport.getMessage("SearchTravel"), Command.ITEM, 0);//GEN-LINE:|45-getter|1|45-postInit
            // write post-init user code here
    }//GEN-BEGIN:|45-getter|2|
    return searchCMD;
}
//</editor-fold>//GEN-END:|45-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: offeredCMD ">//GEN-BEGIN:|47-getter|0|47-preInit
/**
 * Returns an initiliazed instance of offeredCMD component.
 * @return the initialized component instance
 */
public Command getOfferedCMD() {
    if (offeredCMD == null) {//GEN-END:|47-getter|0|47-preInit
            // write pre-init user code here
        offeredCMD = new Command(LocalizationSupport.getMessage("ViewOffered"), Command.ITEM, 0);//GEN-LINE:|47-getter|1|47-postInit
            // write post-init user code here
    }//GEN-BEGIN:|47-getter|2|
    return offeredCMD;
}
//</editor-fold>//GEN-END:|47-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: bookedCMD ">//GEN-BEGIN:|49-getter|0|49-preInit
/**
 * Returns an initiliazed instance of bookedCMD component.
 * @return the initialized component instance
 */
public Command getBookedCMD() {
    if (bookedCMD == null) {//GEN-END:|49-getter|0|49-preInit
            // write pre-init user code here
        bookedCMD = new Command(LocalizationSupport.getMessage("ViewBooked"), Command.ITEM, 0);//GEN-LINE:|49-getter|1|49-postInit
            // write post-init user code here
    }//GEN-BEGIN:|49-getter|2|
    return bookedCMD;
}
//</editor-fold>//GEN-END:|49-getter|2|











//<editor-fold defaultstate="collapsed" desc=" Generated Getter: image ">//GEN-BEGIN:|53-getter|0|53-preInit
/**
 * Returns an initiliazed instance of image component.
 * @return the initialized component instance
 */
public Image getImage() {
    if (image == null) {//GEN-END:|53-getter|0|53-preInit
            // write pre-init user code here
        try {//GEN-BEGIN:|53-getter|1|53-@java.io.IOException
            image = Image.createImage("/icona.png");
        } catch (java.io.IOException e) {//GEN-END:|53-getter|1|53-@java.io.IOException
                e.printStackTrace();
        }//GEN-LINE:|53-getter|2|53-postInit
            // write post-init user code here
    }//GEN-BEGIN:|53-getter|3|
    return image;
}
//</editor-fold>//GEN-END:|53-getter|3|


        // write pre-action user code here

            // write pre-action user code here

            // write pre-action user code here

            // write pre-action user code here


//<editor-fold defaultstate="collapsed" desc=" Generated Getter: screenCommand ">//GEN-BEGIN:|57-getter|0|57-preInit
/**
 * Returns an initiliazed instance of screenCommand component.
 * @return the initialized component instance
 */
public Command getScreenCommand() {
    if (screenCommand == null) {//GEN-END:|57-getter|0|57-preInit
            // write pre-init user code here
        screenCommand = new Command("Screen", Command.SCREEN, 0);//GEN-LINE:|57-getter|1|57-postInit
            // write post-init user code here
    }//GEN-BEGIN:|57-getter|2|
    return screenCommand;
}
//</editor-fold>//GEN-END:|57-getter|2|







//<editor-fold defaultstate="collapsed" desc=" Generated Getter: insertCMD ">//GEN-BEGIN:|75-getter|0|75-preInit
/**
 * Returns an initiliazed instance of insertCMD component.
 * @return the initialized component instance
 */
public Command getInsertCMD() {
    if (insertCMD == null) {//GEN-END:|75-getter|0|75-preInit
            // write pre-init user code here
        insertCMD = new Command(LocalizationSupport.getMessage("InsertTravel"), Command.ITEM, 0);//GEN-LINE:|75-getter|1|75-postInit
            // write post-init user code here
    }//GEN-BEGIN:|75-getter|2|
    return insertCMD;
}
//</editor-fold>//GEN-END:|75-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: viewMapCMD ">//GEN-BEGIN:|77-getter|0|77-preInit
/**
 * Returns an initiliazed instance of viewMapCMD component.
 * @return the initialized component instance
 */
public Command getViewMapCMD() {
    if (viewMapCMD == null) {//GEN-END:|77-getter|0|77-preInit
            // write pre-init user code here
        viewMapCMD = new Command(LocalizationSupport.getMessage("ViewMap"), Command.ITEM, 0);//GEN-LINE:|77-getter|1|77-postInit
            // write post-init user code here
    }//GEN-BEGIN:|77-getter|2|
    return viewMapCMD;
}
//</editor-fold>//GEN-END:|77-getter|2|



//<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand ">//GEN-BEGIN:|89-getter|0|89-preInit
/**
 * Returns an initiliazed instance of backCommand component.
 * @return the initialized component instance
 */
public Command getBackCommand() {
    if (backCommand == null) {//GEN-END:|89-getter|0|89-preInit
            // write pre-init user code here
        backCommand = new Command(Locale.get("Back"), Command.BACK, 1);//GEN-LINE:|89-getter|1|89-postInit
            // write post-init user code here
    }//GEN-BEGIN:|89-getter|2|
    return backCommand;
}
//</editor-fold>//GEN-END:|89-getter|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand ">
/**
 * Returns an initiliazed instance of backCommand component.
 * @return the initialized component instance
 */
Command helpCommand=null;
public Command getHelpCommand() {
    if (helpCommand == null) {
            // write pre-init user code here
        helpCommand = new Command(Locale.get("Help"), Command.HELP, 1);
            // write post-init user code here
    }
    return helpCommand;
}
//<editor-fold defaultstate="collapsed" desc=" Generated Getter: profileUpdateCMD ">//GEN-BEGIN:|92-getter|0|92-preInit
/**
 * Returns an initiliazed instance of profileUpdateCMD component.
 * @return the initialized component instance
 */
public Command getProfileUpdateCMD() {
    if (profileUpdateCMD == null) {//GEN-END:|92-getter|0|92-preInit
            // write pre-init user code here
        profileUpdateCMD = new Command(Locale.get("ProfileUpdate"), Command.ITEM, 0);//GEN-LINE:|92-getter|1|92-postInit
            // write post-init user code here
    }//GEN-BEGIN:|92-getter|2|
    return profileUpdateCMD;
}
//</editor-fold>//GEN-END:|92-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: commitProfileCMD ">//GEN-BEGIN:|94-getter|0|94-preInit
/**
 * Returns an initiliazed instance of commitProfileCMD component.
 * @return the initialized component instance
 */
public Command getCommitProfileCMD() {
    if (commitProfileCMD == null) {//GEN-END:|94-getter|0|94-preInit
            // write pre-init user code here
        commitProfileCMD = new Command(Locale.get("CommitModifies"), Command.ITEM, 0);//GEN-LINE:|94-getter|1|94-postInit
            // write post-init user code here
    }//GEN-BEGIN:|94-getter|2|
    return commitProfileCMD;
}
//</editor-fold>//GEN-END:|94-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: profileForm ">//GEN-BEGIN:|82-getter|0|82-preInit
/**
 * Returns an initiliazed instance of profileForm component.
 * @return the initialized component instance
 */
public Form getProfileForm() {
    if (profileForm == null) {//GEN-END:|82-getter|0|82-preInit
            // write pre-init user code here
        profileForm = new Form(Locale.get("Profile"), new Item[] { getUsernameTextField(), getGenderChoiceGroup(), getNameTextField(), getSurnameTextField(), getEmailTextField(), getTextField(), getProfileChoiceGroup(), getAgeTextField(), getBithTextField(), getPhoneTextField(), getSmokerChoiceGroup() });//GEN-BEGIN:|82-getter|1|82-postInit
        profileForm.addCommand(getBackCommand());
        profileForm.setCommandListener(this);//GEN-END:|82-getter|1|82-postInit
            
            // write post-init user code here
    }//GEN-BEGIN:|82-getter|2|
    return profileForm;
}
//</editor-fold>//GEN-END:|82-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: usernameTextField ">//GEN-BEGIN:|85-getter|0|85-preInit
/**
 * Returns an initiliazed instance of usernameTextField component.
 * @return the initialized component instance
 */
public TextField getUsernameTextField() {
    if (usernameTextField == null) {//GEN-END:|85-getter|0|85-preInit
            // write pre-init user code here
        usernameTextField = new TextField(Locale.get("Username"), "", 32, TextField.ANY);//GEN-LINE:|85-getter|1|85-postInit
            // write post-init user code here
    }//GEN-BEGIN:|85-getter|2|
    return usernameTextField;
}
//</editor-fold>//GEN-END:|85-getter|2|



//<editor-fold defaultstate="collapsed" desc=" Generated Getter: nameTextField ">//GEN-BEGIN:|87-getter|0|87-preInit
/**
 * Returns an initiliazed instance of nameTextField component.
 * @return the initialized component instance
 */
public TextField getNameTextField() {
    if (nameTextField == null) {//GEN-END:|87-getter|0|87-preInit
            // write pre-init user code here
        nameTextField = new TextField(Locale.get("Name"), "", 32, TextField.ANY);//GEN-LINE:|87-getter|1|87-postInit
            // write post-init user code here
    }//GEN-BEGIN:|87-getter|2|
    return nameTextField;
}
//</editor-fold>//GEN-END:|87-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: surnameTextField ">//GEN-BEGIN:|88-getter|0|88-preInit
/**
 * Returns an initiliazed instance of surnameTextField component.
 * @return the initialized component instance
 */
public TextField getSurnameTextField() {
    if (surnameTextField == null) {//GEN-END:|88-getter|0|88-preInit
            // write pre-init user code here
        surnameTextField = new TextField(Locale.get("Surname"), "", 32, TextField.ANY);//GEN-LINE:|88-getter|1|88-postInit
            // write post-init user code here
    }//GEN-BEGIN:|88-getter|2|
    return surnameTextField;
}
//</editor-fold>//GEN-END:|88-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: mapForm ">//GEN-BEGIN:|96-getter|0|96-preInit
/**
 * Returns an initiliazed instance of mapForm component.
 * @return the initialized component instance
 */
public Form getMapForm() {
    if (mapForm == null) {//GEN-END:|96-getter|0|96-preInit
            // write pre-init user code here
        mapForm = new Form("Map", new Item[] { getStateTextField(), getCityTextField(), getAddressTextField() });//GEN-BEGIN:|96-getter|1|96-postInit
        mapForm.addCommand(getSearchOnMapCMD());
        mapForm.addCommand(getBackCommand1());
        mapForm.setCommandListener(this);//GEN-END:|96-getter|1|96-postInit
            // write post-init user code here
            
        
    }//GEN-BEGIN:|96-getter|2|
    return mapForm;
}
//</editor-fold>//GEN-END:|96-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: imageItem5 ">//GEN-BEGIN:|100-getter|0|100-preInit
/**
 * Returns an initiliazed instance of imageItem5 component.
 * @return the initialized component instance
 */
public ImageItem getImageItem5() {
    if (imageItem5 == null) {//GEN-END:|100-getter|0|100-preInit
            // write pre-init user code here
        imageItem5 = new ImageItem("", getLogoImage(), ImageItem.LAYOUT_CENTER, "TripLO-A", Item.PLAIN);//GEN-LINE:|100-getter|1|100-postInit
            // write post-init user code here
    }//GEN-BEGIN:|100-getter|2|
    return imageItem5;
}
//</editor-fold>//GEN-END:|100-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: logoImage ">//GEN-BEGIN:|101-getter|0|101-preInit
/**
 * Returns an initiliazed instance of logoImage component.
 * @return the initialized component instance
 */
public Image getLogoImage() {
    if (logoImage == null) {//GEN-END:|101-getter|0|101-preInit
            // write pre-init user code here
        try {//GEN-BEGIN:|101-getter|1|101-@java.io.IOException
            logoImage = Image.createImage("/logo.png");
        } catch (java.io.IOException e) {//GEN-END:|101-getter|1|101-@java.io.IOException
                e.printStackTrace();
        }//GEN-LINE:|101-getter|2|101-postInit
            // write post-init user code here
    }//GEN-BEGIN:|101-getter|3|
    return logoImage;
}
//</editor-fold>//GEN-END:|101-getter|3|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: searchImage ">//GEN-BEGIN:|103-getter|0|103-preInit
/**
 * Returns an initiliazed instance of searchImage component.
 * @return the initialized component instance
 */
public Image getSearchImage() {
    if (searchImage == null) {//GEN-END:|103-getter|0|103-preInit
            // write pre-init user code here
        try {//GEN-BEGIN:|103-getter|1|103-@java.io.IOException
            searchImage = Image.createImage("/search.png");
        } catch (java.io.IOException e) {//GEN-END:|103-getter|1|103-@java.io.IOException
                e.printStackTrace();
        }//GEN-LINE:|103-getter|2|103-postInit
            // write post-init user code here
    }//GEN-BEGIN:|103-getter|3|
    return searchImage;
}
//</editor-fold>//GEN-END:|103-getter|3|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: profileImage ">//GEN-BEGIN:|104-getter|0|104-preInit
/**
 * Returns an initiliazed instance of profileImage component.
 * @return the initialized component instance
 */
public Image getProfileImage() {
    if (profileImage == null) {//GEN-END:|104-getter|0|104-preInit
            // write pre-init user code here
        try {//GEN-BEGIN:|104-getter|1|104-@java.io.IOException
            profileImage = Image.createImage("/unknownUser.png");
        } catch (java.io.IOException e) {//GEN-END:|104-getter|1|104-@java.io.IOException
                e.printStackTrace();
        }//GEN-LINE:|104-getter|2|104-postInit
            // write post-init user code here
    }//GEN-BEGIN:|104-getter|3|
    return profileImage;
}
//</editor-fold>//GEN-END:|104-getter|3|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: offeredImage ">//GEN-BEGIN:|105-getter|0|105-preInit
/**
 * Returns an initiliazed instance of offeredImage component.
 * @return the initialized component instance
 */
public Image getOfferedImage() {
    if (offeredImage == null) {//GEN-END:|105-getter|0|105-preInit
            // write pre-init user code here
        try {//GEN-BEGIN:|105-getter|1|105-@java.io.IOException
            offeredImage = Image.createImage("/offered.png");
        } catch (java.io.IOException e) {//GEN-END:|105-getter|1|105-@java.io.IOException
                e.printStackTrace();
        }//GEN-LINE:|105-getter|2|105-postInit
            // write post-init user code here
    }//GEN-BEGIN:|105-getter|3|
    return offeredImage;
}
//</editor-fold>//GEN-END:|105-getter|3|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: bookedImage ">//GEN-BEGIN:|106-getter|0|106-preInit
/**
 * Returns an initiliazed instance of bookedImage component.
 * @return the initialized component instance
 */
public Image getBookedImage() {
    if (bookedImage == null) {//GEN-END:|106-getter|0|106-preInit
            // write pre-init user code here
        try {//GEN-BEGIN:|106-getter|1|106-@java.io.IOException
            bookedImage = Image.createImage("/booked.png");
        } catch (java.io.IOException e) {//GEN-END:|106-getter|1|106-@java.io.IOException
                e.printStackTrace();
        }//GEN-LINE:|106-getter|2|106-postInit
            // write post-init user code here
    }//GEN-BEGIN:|106-getter|3|
    return bookedImage;
}
//</editor-fold>//GEN-END:|106-getter|3|



//<editor-fold defaultstate="collapsed" desc=" Generated Getter: insertImage ">//GEN-BEGIN:|108-getter|0|108-preInit
/**
 * Returns an initiliazed instance of insertImage component.
 * @return the initialized component instance
 */
public Image getInsertImage() {
    if (insertImage == null) {//GEN-END:|108-getter|0|108-preInit
            // write pre-init user code here
        try {//GEN-BEGIN:|108-getter|1|108-@java.io.IOException
            insertImage = Image.createImage("/insert.png");
        } catch (java.io.IOException e) {//GEN-END:|108-getter|1|108-@java.io.IOException
                e.printStackTrace();
        }//GEN-LINE:|108-getter|2|108-postInit
            // write post-init user code here
    }//GEN-BEGIN:|108-getter|3|
    return insertImage;
}
//</editor-fold>//GEN-END:|108-getter|3|



//<editor-fold defaultstate="collapsed" desc=" Generated Getter: settingImage ">//GEN-BEGIN:|111-getter|0|111-preInit
/**
 * Returns an initiliazed instance of settingImage component.
 * @return the initialized component instance
 */
public Image getSettingImage() {
    if (settingImage == null) {//GEN-END:|111-getter|0|111-preInit
            // write pre-init user code here
        try {//GEN-BEGIN:|111-getter|1|111-@java.io.IOException
            settingImage = Image.createImage("/config.png");
        } catch (java.io.IOException e) {//GEN-END:|111-getter|1|111-@java.io.IOException
                e.printStackTrace();
        }//GEN-LINE:|111-getter|2|111-postInit
            // write post-init user code here
    }//GEN-BEGIN:|111-getter|3|
    return settingImage;
}
//</editor-fold>//GEN-END:|111-getter|3|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: searchForm ">//GEN-BEGIN:|113-getter|0|113-preInit
/**
 * Returns an initiliazed instance of searchForm component.
 * @return the initialized component instance
 */
public Form getSearchForm() {
    if (searchForm == null) {//GEN-END:|113-getter|0|113-preInit
            // write pre-init user code here
        searchForm = new Form(Locale.get("SearchTravel"), new Item[] { getStringItem2(), getFromTextField(), getToTextField(), getFromDateField(), getToDateField() });//GEN-BEGIN:|113-getter|1|113-postInit
        searchForm.addCommand(getDoSearchCMD());
        searchForm.addCommand(getFromMapCMD());
        searchForm.addCommand(getFromGpsCMD());
        searchForm.addCommand(getToMapCMD());
        searchForm.addCommand(getToGpsCMD());
        searchForm.addCommand(getBackCommand1());
        searchForm.setCommandListener(this);//GEN-END:|113-getter|1|113-postInit
            // write post-init user code here
    }//GEN-BEGIN:|113-getter|2|
    return searchForm;
}
//</editor-fold>//GEN-END:|113-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: fromTextField ">//GEN-BEGIN:|114-getter|0|114-preInit
/**
 * Returns an initiliazed instance of fromTextField component.
 * @return the initialized component instance
 */
public TextField getFromTextField() {
    if (fromTextField == null) {//GEN-END:|114-getter|0|114-preInit
            // write pre-init user code here
        fromTextField = new TextField(Locale.get("Departure"), null, 150, TextField.ANY);//GEN-LINE:|114-getter|1|114-postInit
            // write post-init user code here
    }//GEN-BEGIN:|114-getter|2|
    return fromTextField;
}
//</editor-fold>//GEN-END:|114-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: fromDateField ">//GEN-BEGIN:|116-getter|0|116-preInit
/**
 * Returns an initiliazed instance of fromDateField component.
 * @return the initialized component instance
 */
public DateField getFromDateField() {
    if (fromDateField == null) {//GEN-END:|116-getter|0|116-preInit
            // write pre-init user code here
        fromDateField = new DateField(Locale.get("FromDate"), DateField.DATE);//GEN-BEGIN:|116-getter|1|116-postInit
        fromDateField.setDate(new java.util.Date(System.currentTimeMillis()));//GEN-END:|116-getter|1|116-postInit
            // write post-init user code here
    }//GEN-BEGIN:|116-getter|2|
    return fromDateField;
}
//</editor-fold>//GEN-END:|116-getter|2|



//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem2 ">//GEN-BEGIN:|118-getter|0|118-preInit
/**
 * Returns an initiliazed instance of stringItem2 component.
 * @return the initialized component instance
 */
public StringItem getStringItem2() {
    if (stringItem2 == null) {//GEN-END:|118-getter|0|118-preInit
            // write pre-init user code here
        stringItem2 = new StringItem("", Locale.get("SearchTravelMsg"));//GEN-BEGIN:|118-getter|1|118-postInit
        stringItem2.setLayout(ImageItem.LAYOUT_DEFAULT | ImageItem.LAYOUT_NEWLINE_AFTER);//GEN-END:|118-getter|1|118-postInit
            // write post-init user code here
    }//GEN-BEGIN:|118-getter|2|
    return stringItem2;
}
//</editor-fold>//GEN-END:|118-getter|2|



//<editor-fold defaultstate="collapsed" desc=" Generated Getter: doSearchCMD ">//GEN-BEGIN:|122-getter|0|122-preInit
/**
 * Returns an initiliazed instance of doSearchCMD component.
 * @return the initialized component instance
 */
public Command getDoSearchCMD() {
    if (doSearchCMD == null) {//GEN-END:|122-getter|0|122-preInit
            // write pre-init user code here
        doSearchCMD = new Command(Locale.get("Search"), Locale.get("Search"), Command.OK, 1);//GEN-LINE:|122-getter|1|122-postInit
            // write post-init user code here
    }//GEN-BEGIN:|122-getter|2|
    return doSearchCMD;
}
//</editor-fold>//GEN-END:|122-getter|2|
Command savePosition=null;
public Command getSavePosition() {
    if (savePosition == null) {                                   
            // write pre-init user code here
        savePosition = new Command(Locale.get("SavePosition"), Command.OK, 1);                                     
            // write post-init user code here
    }                          
    return savePosition;
}
//<editor-fold defaultstate="collapsed" desc=" Generated Getter: fromGpsCMD ">//GEN-BEGIN:|126-getter|0|126-preInit
/**
 * Returns an initiliazed instance of fromGpsCMD component.
 * @return the initialized component instance
 */
public Command getFromGpsCMD() {
    if (fromGpsCMD == null) {//GEN-END:|126-getter|0|126-preInit
            // write pre-init user code here
        fromGpsCMD = new Command(Locale.get("fromGPS"), Command.ITEM, 0);//GEN-LINE:|126-getter|1|126-postInit
            // write post-init user code here
    }//GEN-BEGIN:|126-getter|2|
    return fromGpsCMD;
}
//</editor-fold>//GEN-END:|126-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: toMapCMD ">//GEN-BEGIN:|128-getter|0|128-preInit
/**
 * Returns an initiliazed instance of toMapCMD component.
 * @return the initialized component instance
 */
public Command getToMapCMD() {
    if (toMapCMD == null) {//GEN-END:|128-getter|0|128-preInit
            // write pre-init user code here
        toMapCMD = new Command(Locale.get("toMap"), Command.ITEM, 0);//GEN-LINE:|128-getter|1|128-postInit
            // write post-init user code here
    }//GEN-BEGIN:|128-getter|2|
    return toMapCMD;
}
//</editor-fold>//GEN-END:|128-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: toGpsCMD ">//GEN-BEGIN:|130-getter|0|130-preInit
/**
 * Returns an initiliazed instance of toGpsCMD component.
 * @return the initialized component instance
 */
public Command getToGpsCMD() {
    if (toGpsCMD == null) {//GEN-END:|130-getter|0|130-preInit
            // write pre-init user code here
        toGpsCMD = new Command(Locale.get("toGPS"), Command.ITEM, 0);//GEN-LINE:|130-getter|1|130-postInit
            // write post-init user code here
    }//GEN-BEGIN:|130-getter|2|
    return toGpsCMD;
}
//</editor-fold>//GEN-END:|130-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: viewTravelCMD ">//GEN-BEGIN:|139-getter|0|139-preInit
/**
 * Returns an initiliazed instance of viewTravelCMD component.
 * @return the initialized component instance
 */
public Command getViewTravelCMD() {
    if (viewTravelCMD == null) {//GEN-END:|139-getter|0|139-preInit
            // write pre-init user code here
        viewTravelCMD = new Command(Locale.get("ViewTravel"), Command.ITEM, 0);//GEN-LINE:|139-getter|1|139-postInit
            // write post-init user code here
    }//GEN-BEGIN:|139-getter|2|
    return viewTravelCMD;
}
//</editor-fold>//GEN-END:|139-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand1 ">//GEN-BEGIN:|141-getter|0|141-preInit
/**
 * Returns an initiliazed instance of backCommand1 component.
 * @return the initialized component instance
 */
public Command getBackCommand1() {
    if (backCommand1 == null) {//GEN-END:|141-getter|0|141-preInit
            // write pre-init user code here
        backCommand1 = new Command(Locale.get("Back"), Command.BACK, 1);//GEN-LINE:|141-getter|1|141-postInit
            // write post-init user code here
    }//GEN-BEGIN:|141-getter|2|
    return backCommand1;
}
//</editor-fold>//GEN-END:|141-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: resultList ">//GEN-BEGIN:|134-getter|0|134-preInit
/**
 * Returns an initiliazed instance of resultList component.
 * @return the initialized component instance
 */
public List getResultList() {
    if (resultList == null) {//GEN-END:|134-getter|0|134-preInit
            // write pre-init user code here
        resultList = new List(Locale.get("searchResult"), Choice.IMPLICIT);//GEN-BEGIN:|134-getter|1|134-postInit
        resultList.addCommand(getViewTravelCMD());
        resultList.addCommand(getBackCommand());
        resultList.setCommandListener(this);//GEN-END:|134-getter|1|134-postInit
            // write post-init user code here
    }//GEN-BEGIN:|134-getter|2|
    return resultList;
}
//</editor-fold>//GEN-END:|134-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: resultListAction ">//GEN-BEGIN:|134-action|0|134-preAction
/**
 * Performs an action assigned to the selected list element in the resultList component.
 */
public void resultListAction() {//GEN-END:|134-action|0|134-preAction
        // enter pre-action user code here
    String __selectedString = getResultList().getString(getResultList().getSelectedIndex());//GEN-LINE:|134-action|1|134-postAction
        // enter post-action user code here
}//GEN-BEGIN:|134-action|2|
//</editor-fold>//GEN-END:|134-action|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: travelDetailsCMD ">//GEN-BEGIN:|158-getter|0|158-preInit
/**
 * Returns an initiliazed instance of travelDetailsCMD component.
 * @return the initialized component instance
 */
public Command getTravelDetailsCMD() {
    if (travelDetailsCMD == null) {//GEN-END:|158-getter|0|158-preInit
            // write pre-init user code here
        travelDetailsCMD = new Command("View Datalied Info", "View Intermediate stop etc...", Command.ITEM, 0);//GEN-LINE:|158-getter|1|158-postInit
            // write post-init user code here
    }//GEN-BEGIN:|158-getter|2|
    return travelDetailsCMD;
}
//</editor-fold>//GEN-END:|158-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: userProfileCMD ">//GEN-BEGIN:|160-getter|0|160-preInit
/**
 * Returns an initiliazed instance of userProfileCMD component.
 * @return the initialized component instance
 */
public Command getUserProfileCMD() {
    if (userProfileCMD == null) {//GEN-END:|160-getter|0|160-preInit
            // write pre-init user code here
        userProfileCMD = new Command(Locale.get("ViewProfile"), Command.ITEM, 0);//GEN-LINE:|160-getter|1|160-postInit
            // write post-init user code here
    }//GEN-BEGIN:|160-getter|2|
    return userProfileCMD;
}
//</editor-fold>//GEN-END:|160-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: travelForm ">//GEN-BEGIN:|150-getter|0|150-preInit
/**
 * Returns an initiliazed instance of travelForm component.
 * @return the initialized component instance
 */
public Form getTravelForm() {
    if (travelForm == null) {//GEN-END:|150-getter|0|150-preInit
            // write pre-init user code here
        travelForm = new Form(Locale.get("Travel"), new Item[] { getIdStringItem(), getFromStringItem(), getToStringItem(), getDateStringItem(), getTimeStringItem(), getOwnerStringItem(), getChoiceGroup1(), getSeatStringItem() });//GEN-BEGIN:|150-getter|1|150-postInit
        travelForm.addCommand(getTravelDetailsCMD());
        travelForm.addCommand(getUserProfileCMD());
        travelForm.addCommand(getBackCommand1());
        travelForm.addCommand(getBookCommand());
        travelForm.addCommand(getAddFavoriteCMD());
        travelForm.setCommandListener(this);//GEN-END:|150-getter|1|150-postInit
            // write post-init user code here
    }//GEN-BEGIN:|150-getter|2|
    return travelForm;
}
//</editor-fold>//GEN-END:|150-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: fromStringItem ">//GEN-BEGIN:|154-getter|0|154-preInit
/**
 * Returns an initiliazed instance of fromStringItem component.
 * @return the initialized component instance
 */
public StringItem getFromStringItem() {
    if (fromStringItem == null) {//GEN-END:|154-getter|0|154-preInit
            // write pre-init user code here
        fromStringItem = new StringItem(Locale.get("Departure"), "Partenza");//GEN-LINE:|154-getter|1|154-postInit
            // write post-init user code here
    }//GEN-BEGIN:|154-getter|2|
    return fromStringItem;
}
//</editor-fold>//GEN-END:|154-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: toStringItem ">//GEN-BEGIN:|155-getter|0|155-preInit
/**
 * Returns an initiliazed instance of toStringItem component.
 * @return the initialized component instance
 */
public StringItem getToStringItem() {
    if (toStringItem == null) {//GEN-END:|155-getter|0|155-preInit
            // write pre-init user code here
        toStringItem = new StringItem(Locale.get("Destination"), "Destinazione");//GEN-LINE:|155-getter|1|155-postInit
            // write post-init user code here
    }//GEN-BEGIN:|155-getter|2|
    return toStringItem;
}
//</editor-fold>//GEN-END:|155-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: dateStringItem ">//GEN-BEGIN:|156-getter|0|156-preInit
/**
 * Returns an initiliazed instance of dateStringItem component.
 * @return the initialized component instance
 */
public StringItem getDateStringItem() {
    if (dateStringItem == null) {//GEN-END:|156-getter|0|156-preInit
            // write pre-init user code here
        dateStringItem = new StringItem(Locale.get("Date"), "Data");//GEN-LINE:|156-getter|1|156-postInit
            // write post-init user code here
    }//GEN-BEGIN:|156-getter|2|
    return dateStringItem;
}
//</editor-fold>//GEN-END:|156-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: ownerStringItem ">//GEN-BEGIN:|157-getter|0|157-preInit
/**
 * Returns an initiliazed instance of ownerStringItem component.
 * @return the initialized component instance
 */
public StringItem getOwnerStringItem() {
    if (ownerStringItem == null) {//GEN-END:|157-getter|0|157-preInit
            // write pre-init user code here
        ownerStringItem = new StringItem(Locale.get("OfferedBy"), "topolino", Item.BUTTON);//GEN-BEGIN:|157-getter|1|157-postInit
        ownerStringItem.addCommand(getProfileCMD());
        ownerStringItem.setItemCommandListener(this);
        ownerStringItem.setDefaultCommand(getProfileCMD());//GEN-END:|157-getter|1|157-postInit
            // write post-init user code here
    }//GEN-BEGIN:|157-getter|2|
    return ownerStringItem;
}
//</editor-fold>//GEN-END:|157-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: cancelBookCMD ">//GEN-BEGIN:|170-getter|0|170-preInit
/**
 * Returns an initiliazed instance of cancelBookCMD component.
 * @return the initialized component instance
 */
public Command getCancelBookCMD() {
    if (cancelBookCMD == null) {//GEN-END:|170-getter|0|170-preInit
            // write pre-init user code here
        cancelBookCMD = new Command(Locale.get("Remove"), Command.ITEM, 0);//GEN-LINE:|170-getter|1|170-postInit
            // write post-init user code here
    }//GEN-BEGIN:|170-getter|2|
    return cancelBookCMD;
}
//</editor-fold>//GEN-END:|170-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: bookedtravel ">//GEN-BEGIN:|164-getter|0|164-preInit
/**
 * Returns an initiliazed instance of bookedtravel component.
 * @return the initialized component instance
 */
public List getBookedtravel() {
    if (bookedtravel == null) {//GEN-END:|164-getter|0|164-preInit
            // write pre-init user code here
        bookedtravel = new List(Locale.get("Booked"), Choice.IMPLICIT);//GEN-BEGIN:|164-getter|1|164-postInit
        bookedtravel.addCommand(getViewTravelCMD());
        bookedtravel.addCommand(getCancelBookCMD());
        bookedtravel.addCommand(getBackCommand());
        bookedtravel.setCommandListener(this);//GEN-END:|164-getter|1|164-postInit
            // write post-init user code here
    }//GEN-BEGIN:|164-getter|2|
    return bookedtravel;
}
//</editor-fold>//GEN-END:|164-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: bookedtravelAction ">//GEN-BEGIN:|164-action|0|164-preAction
/**
 * Performs an action assigned to the selected list element in the bookedtravel component.
 */
public void bookedtravelAction() {//GEN-END:|164-action|0|164-preAction
        // enter pre-action user code here
    String __selectedString = getBookedtravel().getString(getBookedtravel().getSelectedIndex());//GEN-LINE:|164-action|1|164-postAction
        // enter post-action user code here
}//GEN-BEGIN:|164-action|2|
//</editor-fold>//GEN-END:|164-action|2|



//<editor-fold defaultstate="collapsed" desc=" Generated Getter: task ">//GEN-BEGIN:|182-getter|0|182-preInit
/**
 * Returns an initiliazed instance of task component.
 * @return the initialized component instance
 */
public SimpleCancellableTask getTask() {
    if (task == null) {//GEN-END:|182-getter|0|182-preInit
            // write pre-init user code here
        task = new SimpleCancellableTask();//GEN-BEGIN:|182-getter|1|182-execute
        task.setExecutable(new org.netbeans.microedition.util.Executable() {
            public void execute() throws Exception {//GEN-END:|182-getter|1|182-execute
                    // write task-execution user code here
            }//GEN-BEGIN:|182-getter|2|182-postInit
        });//GEN-END:|182-getter|2|182-postInit
            // write post-init user code here
    }//GEN-BEGIN:|182-getter|3|
    return task;
}
//</editor-fold>//GEN-END:|182-getter|3|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: mapImage ">//GEN-BEGIN:|184-getter|0|184-preInit
/**
 * Returns an initiliazed instance of mapImage component.
 * @return the initialized component instance
 */
public Image getMapImage() {
    if (mapImage == null) {//GEN-END:|184-getter|0|184-preInit
            // write pre-init user code here
        try {//GEN-BEGIN:|184-getter|1|184-@java.io.IOException
            mapImage = Image.createImage("/map.png");
        } catch (java.io.IOException e) {//GEN-END:|184-getter|1|184-@java.io.IOException
                e.printStackTrace();
        }//GEN-LINE:|184-getter|2|184-postInit
            // write post-init user code here
    }//GEN-BEGIN:|184-getter|3|
    return mapImage;
}
//</editor-fold>//GEN-END:|184-getter|3|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: GoHomedirectly ">//GEN-BEGIN:|185-getter|0|185-preInit
/**
 * Returns an initiliazed instance of GoHomedirectly component.
 * @return the initialized component instance
 */
public Command getGoHomedirectly() {
    if (GoHomedirectly == null) {//GEN-END:|185-getter|0|185-preInit
            // write pre-init user code here
        GoHomedirectly = new Command("Go home directly", Command.ITEM, 0);//GEN-LINE:|185-getter|1|185-postInit
            // write post-init user code here
    }//GEN-BEGIN:|185-getter|2|
    return GoHomedirectly;
}
//</editor-fold>//GEN-END:|185-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stateTextField ">//GEN-BEGIN:|188-getter|0|188-preInit
/**
 * Returns an initiliazed instance of stateTextField component.
 * @return the initialized component instance
 */
public TextField getStateTextField() {
    if (stateTextField == null) {//GEN-END:|188-getter|0|188-preInit
            // write pre-init user code here
        stateTextField = new TextField(Locale.get("State"), null, 32, TextField.ANY);//GEN-LINE:|188-getter|1|188-postInit
            // write post-init user code here
    }//GEN-BEGIN:|188-getter|2|
    return stateTextField;
}
//</editor-fold>//GEN-END:|188-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: cityTextField ">//GEN-BEGIN:|191-getter|0|191-preInit
/**
 * Returns an initiliazed instance of cityTextField component.
 * @return the initialized component instance
 */
public TextField getCityTextField() {
    if (cityTextField == null) {//GEN-END:|191-getter|0|191-preInit
            // write pre-init user code here
        cityTextField = new TextField(Locale.get("City"), null, 32, TextField.ANY);//GEN-LINE:|191-getter|1|191-postInit
            // write post-init user code here
    }//GEN-BEGIN:|191-getter|2|
    return cityTextField;
}
//</editor-fold>//GEN-END:|191-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: addressTextField ">//GEN-BEGIN:|192-getter|0|192-preInit
/**
 * Returns an initiliazed instance of addressTextField component.
 * @return the initialized component instance
 */
public TextField getAddressTextField() {
    if (addressTextField == null) {//GEN-END:|192-getter|0|192-preInit
            // write pre-init user code here
        addressTextField = new TextField(Locale.get("Address"), null, 32, TextField.ANY);//GEN-LINE:|192-getter|1|192-postInit
            // write post-init user code here
    }//GEN-BEGIN:|192-getter|2|
    return addressTextField;
}
//</editor-fold>//GEN-END:|192-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: searchOnMapCMD ">//GEN-BEGIN:|193-getter|0|193-preInit
/**
 * Returns an initiliazed instance of searchOnMapCMD component.
 * @return the initialized component instance
 */
public Command getSearchOnMapCMD() {
    if (searchOnMapCMD == null) {//GEN-END:|193-getter|0|193-preInit
            // write pre-init user code here
        searchOnMapCMD = new Command(Locale.get("ViewMap"), Command.ITEM, 0);//GEN-LINE:|193-getter|1|193-postInit
            // write post-init user code here
    }//GEN-BEGIN:|193-getter|2|
    return searchOnMapCMD;
}
//</editor-fold>//GEN-END:|193-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: choiceGroup1 ">//GEN-BEGIN:|198-getter|0|198-preInit
/**
 * Returns an initiliazed instance of choiceGroup1 component.
 * @return the initialized component instance
 */
public ChoiceGroup getChoiceGroup1() {
    if (choiceGroup1 == null) {//GEN-END:|198-getter|0|198-preInit
            // write pre-init user code here
        choiceGroup1 = new ChoiceGroup("", Choice.MULTIPLE);//GEN-BEGIN:|198-getter|1|198-postInit
        choiceGroup1.setSelectedFlags(new boolean[] {  });//GEN-END:|198-getter|1|198-postInit
            // write post-init user code here
    }//GEN-BEGIN:|198-getter|2|
    return choiceGroup1;
}
//</editor-fold>//GEN-END:|198-getter|2|



//<editor-fold defaultstate="collapsed" desc=" Generated Getter: seatStringItem ">//GEN-BEGIN:|201-getter|0|201-preInit
/**
 * Returns an initiliazed instance of seatStringItem component.
 * @return the initialized component instance
 */
public StringItem getSeatStringItem() {
    if (seatStringItem == null) {//GEN-END:|201-getter|0|201-preInit
            // write pre-init user code here
        seatStringItem = new StringItem(Locale.get("FeedbackPoint"), "1");//GEN-LINE:|201-getter|1|201-postInit
            // write post-init user code here
    }//GEN-BEGIN:|201-getter|2|
    return seatStringItem;
}
//</editor-fold>//GEN-END:|201-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand ">//GEN-BEGIN:|207-getter|0|207-preInit
/**
 * Returns an initiliazed instance of okCommand component.
 * @return the initialized component instance
 */
public Command getOkCommand() {
    if (okCommand == null) {//GEN-END:|207-getter|0|207-preInit
            // write pre-init user code here
        okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|207-getter|1|207-postInit
            // write post-init user code here
    }//GEN-BEGIN:|207-getter|2|
    return okCommand;
}
//</editor-fold>//GEN-END:|207-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: settingForm ">//GEN-BEGIN:|202-getter|0|202-preInit
/**
 * Returns an initiliazed instance of settingForm component.
 * @return the initialized component instance
 */
public Form getSettingForm() {
    if (settingForm == null) {//GEN-END:|202-getter|0|202-preInit
            // write pre-init user code here
        settingForm = new Form(Locale.get("Settings"), new Item[] { getOptionsGruop() });//GEN-BEGIN:|202-getter|1|202-postInit
        settingForm.addCommand(getBackCommand());
        settingForm.addCommand(getOkCommand());
        settingForm.setCommandListener(this);//GEN-END:|202-getter|1|202-postInit
            optionsGruop.setSelectedIndex(0, op.autoLogin);
            optionsGruop.setSelectedIndex(1, op.savePassword);
            // write post-init user code here
    }//GEN-BEGIN:|202-getter|2|
    return settingForm;
}
//</editor-fold>//GEN-END:|202-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: optionsGruop ">//GEN-BEGIN:|204-getter|0|204-preInit
/**
 * Returns an initiliazed instance of optionsGruop component.
 * @return the initialized component instance
 */
public ChoiceGroup getOptionsGruop() {
    if (optionsGruop == null) {//GEN-END:|204-getter|0|204-preInit
            // write pre-init user code here
        optionsGruop = new ChoiceGroup(Locale.get("Options"), Choice.MULTIPLE);//GEN-BEGIN:|204-getter|1|204-postInit
        optionsGruop.append(Locale.get("AutoLogin"), null);
        optionsGruop.append(Locale.get("SavePassword"), null);
        optionsGruop.setSelectedFlags(new boolean[] { false, false });
        optionsGruop.setFont(0, null);
        optionsGruop.setFont(1, null);//GEN-END:|204-getter|1|204-postInit
            // write post-init user code here
    }//GEN-BEGIN:|204-getter|2|
    return optionsGruop;
}
//</editor-fold>//GEN-END:|204-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: bookCommand ">//GEN-BEGIN:|211-getter|0|211-preInit
/**
 * Returns an initiliazed instance of bookCommand component.
 * @return the initialized component instance
 */
public Command getBookCommand() {
    if (bookCommand == null) {//GEN-END:|211-getter|0|211-preInit
            // write pre-init user code here
        bookCommand = new Command(Locale.get("Book"), Command.ITEM, 0);//GEN-LINE:|211-getter|1|211-postInit
            // write post-init user code here
    }//GEN-BEGIN:|211-getter|2|
    return bookCommand;
}
//</editor-fold>//GEN-END:|211-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: fromMapCMD ">//GEN-BEGIN:|124-getter|0|124-preInit
/**
 * Returns an initiliazed instance of fromMapCMD component.
 * @return the initialized component instance
 */
public Command getFromMapCMD() {
    if (fromMapCMD == null) {//GEN-END:|124-getter|0|124-preInit
            // write pre-init user code here
        fromMapCMD = new Command(Locale.get("fromMap"), Command.ITEM, 0);//GEN-LINE:|124-getter|1|124-postInit
            // write post-init user code here
    }//GEN-BEGIN:|124-getter|2|
    return fromMapCMD;
}
//</editor-fold>//GEN-END:|124-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: ticker ">//GEN-BEGIN:|225-getter|0|225-preInit
/**
 * Returns an initiliazed instance of ticker component.
 * @return the initialized component instance
 */
public Ticker getTicker() {
    if (ticker == null) {//GEN-END:|225-getter|0|225-preInit
            // write pre-init user code here
        ticker = new Ticker("Connecting ...");//GEN-LINE:|225-getter|1|225-postInit
            // write post-init user code here
    }//GEN-BEGIN:|225-getter|2|
    return ticker;
}
//</editor-fold>//GEN-END:|225-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: settingCMD ">//GEN-BEGIN:|226-getter|0|226-preInit
/**
 * Returns an initiliazed instance of settingCMD component.
 * @return the initialized component instance
 */
public Command getSettingCMD() {
    if (settingCMD == null) {//GEN-END:|226-getter|0|226-preInit
            // write pre-init user code here
        settingCMD = new Command(Locale.get("Settings"), Command.ITEM, 0);//GEN-LINE:|226-getter|1|226-postInit
            // write post-init user code here
    }//GEN-BEGIN:|226-getter|2|
    return settingCMD;
}
//</editor-fold>//GEN-END:|226-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: timeStringItem ">//GEN-BEGIN:|232-getter|0|232-preInit
/**
 * Returns an initiliazed instance of timeStringItem component.
 * @return the initialized component instance
 */
public StringItem getTimeStringItem() {
    if (timeStringItem == null) {//GEN-END:|232-getter|0|232-preInit
            // write pre-init user code here
        timeStringItem = new StringItem(Locale.get("Time"), "Ora");//GEN-LINE:|232-getter|1|232-postInit
            // write post-init user code here
    }//GEN-BEGIN:|232-getter|2|
    return timeStringItem;
}
//</editor-fold>//GEN-END:|232-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: idStringItem ">//GEN-BEGIN:|248-getter|0|248-preInit
/**
 * Returns an initiliazed instance of idStringItem component.
 * @return the initialized component instance
 */
public StringItem getIdStringItem() {
    if (idStringItem == null) {//GEN-END:|248-getter|0|248-preInit
        // write pre-init user code here
        idStringItem = new StringItem(Locale.get("Number"), "1");//GEN-LINE:|248-getter|1|248-postInit
        // write post-init user code here
    }//GEN-BEGIN:|248-getter|2|
    return idStringItem;
}
//</editor-fold>//GEN-END:|248-getter|2|



//<editor-fold defaultstate="collapsed" desc=" Generated Getter: offerCMD ">//GEN-BEGIN:|259-getter|0|259-preInit
/**
 * Returns an initiliazed instance of offerCMD component.
 * @return the initialized component instance
 */
public Command getOfferCMD() {
    if (offerCMD == null) {//GEN-END:|259-getter|0|259-preInit
        // write pre-init user code here
        offerCMD = new Command(Locale.get("Offer"), Command.ITEM, 0);//GEN-LINE:|259-getter|1|259-postInit
        // write post-init user code here
    }//GEN-BEGIN:|259-getter|2|
    return offerCMD;
}
//</editor-fold>//GEN-END:|259-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: insertForm ">//GEN-BEGIN:|252-getter|0|252-preInit
/**
 * Returns an initiliazed instance of insertForm component.
 * @return the initialized component instance
 */
public Form getInsertForm() {
    if (insertForm == null) {//GEN-END:|252-getter|0|252-preInit
        // write pre-init user code here
        insertForm = new Form(Locale.get("Travel"), new Item[] { getInsertFromTextField(), getInsertToTextField(), getDateField1(), getVehicleChoiceGroup(), getFreeSeatsTextField(), getInsertChoice(), getExtimatedTextField(), getExtimatedBudgetTextField(), getExpirationDateField(), getDeviationTextField(), getNotesTextField() });//GEN-BEGIN:|252-getter|1|252-postInit
        insertForm.addCommand(getOfferCMD());
        insertForm.addCommand(getFromMapCMD());
        insertForm.addCommand(getFromGpsCMD());
        insertForm.addCommand(getToMapCMD());
        insertForm.addCommand(getToGpsCMD());
        insertForm.addCommand(getBackCommand());
        insertForm.setCommandListener(this);//GEN-END:|252-getter|1|252-postInit
        // write post-init user code here
    }//GEN-BEGIN:|252-getter|2|
    return insertForm;
}
//</editor-fold>//GEN-END:|252-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: insertFromTextField ">//GEN-BEGIN:|253-getter|0|253-preInit
/**
 * Returns an initiliazed instance of insertFromTextField component.
 * @return the initialized component instance
 */
public TextField getInsertFromTextField() {
    if (insertFromTextField == null) {//GEN-END:|253-getter|0|253-preInit
        // write pre-init user code here
        insertFromTextField = new TextField(Locale.get("Departure"), "", 32, TextField.ANY);//GEN-LINE:|253-getter|1|253-postInit
        // write post-init user code here
    }//GEN-BEGIN:|253-getter|2|
    return insertFromTextField;
}
//</editor-fold>//GEN-END:|253-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: insertToTextField ">//GEN-BEGIN:|254-getter|0|254-preInit
/**
 * Returns an initiliazed instance of insertToTextField component.
 * @return the initialized component instance
 */
public TextField getInsertToTextField() {
    if (insertToTextField == null) {//GEN-END:|254-getter|0|254-preInit
        // write pre-init user code here
        insertToTextField = new TextField(Locale.get("Destination"), "", 32, TextField.ANY);//GEN-LINE:|254-getter|1|254-postInit
        // write post-init user code here
    }//GEN-BEGIN:|254-getter|2|
    return insertToTextField;
}
//</editor-fold>//GEN-END:|254-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: dateField1 ">//GEN-BEGIN:|255-getter|0|255-preInit
/**
 * Returns an initiliazed instance of dateField1 component.
 * @return the initialized component instance
 */
public DateField getDateField1() {
    if (dateField1 == null) {//GEN-END:|255-getter|0|255-preInit
        // write pre-init user code here
        dateField1 = new DateField(Locale.get("Date"), DateField.DATE_TIME);//GEN-BEGIN:|255-getter|1|255-postInit
        dateField1.setDate(new java.util.Date(System.currentTimeMillis()));//GEN-END:|255-getter|1|255-postInit
        // write post-init user code here
    }//GEN-BEGIN:|255-getter|2|
    return dateField1;
}
//</editor-fold>//GEN-END:|255-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: freeSeatsTextField ">//GEN-BEGIN:|256-getter|0|256-preInit
/**
 * Returns an initiliazed instance of freeSeatsTextField component.
 * @return the initialized component instance
 */
public TextField getFreeSeatsTextField() {
    if (freeSeatsTextField == null) {//GEN-END:|256-getter|0|256-preInit
        // write pre-init user code here
        freeSeatsTextField = new TextField(Locale.get("AviableSeats"), "0", 3, TextField.NUMERIC);//GEN-LINE:|256-getter|1|256-postInit
        // write post-init user code here
    }//GEN-BEGIN:|256-getter|2|
    return freeSeatsTextField;
}
//</editor-fold>//GEN-END:|256-getter|2|





//<editor-fold defaultstate="collapsed" desc=" Generated Getter: itemCommand1 ">//GEN-BEGIN:|270-getter|0|270-preInit
/**
 * Returns an initiliazed instance of itemCommand1 component.
 * @return the initialized component instance
 */
public Command getItemCommand1() {
    if (itemCommand1 == null) {//GEN-END:|270-getter|0|270-preInit
        // write pre-init user code here
        itemCommand1 = new Command("Insert Intermediate Stop", Command.ITEM, 0);//GEN-LINE:|270-getter|1|270-postInit
        // write post-init user code here
    }//GEN-BEGIN:|270-getter|2|
    return itemCommand1;
}
//</editor-fold>//GEN-END:|270-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: waitScreen1 ">//GEN-BEGIN:|273-getter|0|273-preInit
/**
 * Returns an initiliazed instance of waitScreen1 component.
 * @return the initialized component instance
 */
public Alert getWaitScreen1() {
    if (waitScreen1 == null) {//GEN-END:|273-getter|0|273-preInit
        // write pre-init user code here
        waitScreen1 = new Alert("alert", "Connecting to server...", null, AlertType.INFO);//GEN-BEGIN:|273-getter|1|273-postInit
        waitScreen1.addCommand(getBackCommand());
        waitScreen1.addCommand(getSettingCMD());
        waitScreen1.setCommandListener(this);
        waitScreen1.setTimeout(Alert.FOREVER);//GEN-END:|273-getter|1|273-postInit
        // write post-init user code here
    }//GEN-BEGIN:|273-getter|2|
    return waitScreen1;
}
//</editor-fold>//GEN-END:|273-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: homeList ">//GEN-BEGIN:|279-getter|0|279-preInit
/**
 * Returns an initiliazed instance of homeList component.
 * @return the initialized component instance
 */
public List getHomeList() {
    if (homeList == null) {//GEN-END:|279-getter|0|279-preInit
        // write pre-init user code here
        //#style home
        homeList = new List(Locale.get("Wellcome"), Choice.IMPLICIT);//GEN-BEGIN:|279-getter|1|279-postInit
        homeList.addCommand(getLogoutCMD());
        homeList.addCommand(getExitCommand());
        homeList.setCommandListener(this);
        homeList.setSelectedFlags(new boolean[] {  });//GEN-END:|279-getter|1|279-postInit
        //#style homeCommand
        homeList.append(Locale.get("ViewProfile"),null );//0
        //#style homeCommand
        homeList.append(Locale.get("Search"),null );//1
        //#style homeCommand
        homeList.append(Locale.get("ViewBooked"),null );//2
        //#style homeCommand
        homeList.append(Locale.get("Insert"),null );//3
        //#style homeCommand
        homeList.append(Locale.get("ViewOffered"),null );//4
        //#style homeCommand
        homeList.append(Locale.get("ViewMap"),null );//5
        //#style homeCommand
        homeList.append(Locale.get("Settings"),null );//6
        //#style homeCommand
        homeList.append(Locale.get("Exit"),null );//7
        //#style homeCommand
        homeList.append(Locale.get("BluetoothGPS"),null );//8
        //#style homeCommand
        homeList.append(Locale.get("Favorites"),null );//9
        //#style homeCommand
        homeList.append(Locale.get("Messages"),null );//10
        //#style homeCommand
        homeList.append(Locale.get("ManageFriend"),null );//11
        // write post-init user code here
    }//GEN-BEGIN:|279-getter|2|
    return homeList;
}
//</editor-fold>//GEN-END:|279-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: homeListAction ">//GEN-BEGIN:|279-action|0|279-preAction
/**
 * Performs an action assigned to the selected list element in the homeList component.
 */
public void homeListAction() {//GEN-END:|279-action|0|279-preAction
    // enter pre-action user code here
    String __selectedString = getHomeList().getString(getHomeList().getSelectedIndex());//GEN-LINE:|279-action|1|279-postAction
    int selectedItem = this.getHomeList().getSelectedIndex();
    try{
                            switch(selectedItem)
                                {
                                    case 0:
                                        
                    w.getProfile(IDSession,""+userID);
                                        break;
                                    case 1:
                    switchDisplayable(null, getSearchForm()); 
                                        break;
                                    case 2:
                                        switchDisplayable(null, getWaitScreen1());                                            
                    this.waitScreen1.setString("Waiting connection");
                    w.booked(IDSession, 0, 20);
                                        break;
                                    case 3:
                                        w.getVehicleList(IDSession, ""+userID);
                                        
                                        break;
                                        case 4:switchDisplayable(null, getWaitScreen1());                                            
                    this.waitScreen1.setString("Waiting connection");
                    w.offered(IDSession, 0, 20);
                                        break;
                                        case 5:
                                            switchDisplayable(null, getMapForm());
                                        break;
                                        case 6:
                    switchDisplayable(null, getSettingForm()); 
                                        break;
                                        case 7:
                                            notifyDestroyed();
                                        break;
                                        case 8: bt=new BTConnector(this);
                                        switchDisplayable(null, this.getBluetoothList());
                                        break;
                                        case 9: switchDisplayable(null, getWaitScreen1());                                            
                    this.waitScreen1.setString("Waiting connection");
                    w.favoriteTrip(IDSession, 0, 10);
                    break;
                                        case 10: switchDisplayable(null, getWaitScreen1());                                            
                    this.waitScreen1.setString("Waiting connection");
                    w.getMessages(IDSession,""+userID,0,40);
                    break;
                    case 11: switchDisplayable(null, getWaitScreen1());                                            
                    this.waitScreen1.setString("Waiting connection");
                    w.getBuddyList(IDSession);
                    break;
                                }
    }catch(Exception e)
    {
       
        this.showAlert2(e.getMessage());
    }
                            // enter post-action user code here
}//GEN-BEGIN:|279-action|2|
//</editor-fold>//GEN-END:|279-action|2|
private void showAlert2(String message) {
		//#style messageAlert
		Alert alert = new Alert( "Alert", message, null, AlertType.INFO );
		alert.setTimeout( Alert.FOREVER );
		this.switchDisplayable(alert, getHomeList());
	}
//<editor-fold defaultstate="collapsed" desc=" Generated Getter: goListHomeCMD ">//GEN-BEGIN:|286-getter|0|286-preInit
/**
 * Returns an initiliazed instance of goListHomeCMD component.
 * @return the initialized component instance
 */
public Command getGoListHomeCMD() {
    if (goListHomeCMD == null) {//GEN-END:|286-getter|0|286-preInit
        // write pre-init user code here
        goListHomeCMD = new Command("vai alla home [debug]", Command.SCREEN, 0);//GEN-LINE:|286-getter|1|286-postInit
        // write post-init user code here
    }//GEN-BEGIN:|286-getter|2|
    return goListHomeCMD;
}
//</editor-fold>//GEN-END:|286-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: toTextField ">//GEN-BEGIN:|117-getter|0|117-preInit
/**
 * Returns an initiliazed instance of toTextField component.
 * @return the initialized component instance
 */
public TextField getToTextField() {
    if (toTextField == null) {//GEN-END:|117-getter|0|117-preInit
        // write pre-init user code here
        toTextField = new TextField(Locale.get("Destination"), null, 32, TextField.ANY);//GEN-LINE:|117-getter|1|117-postInit
        // write post-init user code here
    }//GEN-BEGIN:|117-getter|2|
    return toTextField;
}
//</editor-fold>//GEN-END:|117-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: toDateField ">//GEN-BEGIN:|293-getter|0|293-preInit
/**
 * Returns an initiliazed instance of toDateField component.
 * @return the initialized component instance
 */
public DateField getToDateField() {
    if (toDateField == null) {//GEN-END:|293-getter|0|293-preInit
        // write pre-init user code here
        toDateField = new DateField(Locale.get("ToDate"), DateField.DATE);//GEN-BEGIN:|293-getter|1|293-postInit
        toDateField.setDate(new java.util.Date(System.currentTimeMillis()));//GEN-END:|293-getter|1|293-postInit
        // write post-init user code here
    }//GEN-BEGIN:|293-getter|2|
    return toDateField;
}
//</editor-fold>//GEN-END:|293-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: bluetoothList ">//GEN-BEGIN:|294-getter|0|294-preInit
/**
 * Returns an initiliazed instance of bluetoothList component.
 * @return the initialized component instance
 */
public List getBluetoothList() {
    if (bluetoothList == null) {//GEN-END:|294-getter|0|294-preInit
        // write pre-init user code here
        bluetoothList = new List("Bluetooth List", Choice.IMPLICIT);//GEN-BEGIN:|294-getter|1|294-postInit
        bluetoothList.addCommand(getSelectGPSCMD());
        bluetoothList.setCommandListener(this);
        bluetoothList.setFitPolicy(Choice.TEXT_WRAP_DEFAULT);//GEN-END:|294-getter|1|294-postInit
        // write post-init user code here
    }//GEN-BEGIN:|294-getter|2|
    return bluetoothList;
}
//</editor-fold>//GEN-END:|294-getter|2|
public String GPSurl="";
//<editor-fold defaultstate="collapsed" desc=" Generated Method: bluetoothListAction ">//GEN-BEGIN:|294-action|0|294-preAction
/**
 * Performs an action assigned to the selected list element in the bluetoothList component.
 */
public void bluetoothListAction() {//GEN-END:|294-action|0|294-preAction
    // enter pre-action user code here
    String __selectedString = getBluetoothList().getString(getBluetoothList().getSelectedIndex());//GEN-LINE:|294-action|1|294-postAction
    int index=getBluetoothList().getSelectedIndex();
    
    bt.connect(index);
    /*RemoteDevice dev=(RemoteDevice)bt.getDevices().elementAt(index);
    this.GPSurl=dev.getBluetoothAddress();
    GPSSearch s=new GPSSearch(this);
    new Thread(s).start*/
    // enter post-action user code here
}//GEN-BEGIN:|294-action|2|
//</editor-fold>//GEN-END:|294-action|2|
public void openGPS()
{
    GPSurl=bt.url;
    System.out.println("url gps"+GPSurl);
    //gps=new GPSReader(dev.getBluetoothAddress());
    /*Criteria c=new Criteria();
    c.setRemoteDeviceAddress(GPSurl);
    try{
    LocationProvider l=LocationProvider.getInstance(c);
    l.setLocationListener(this, -1, -1, -1);
    }catch(Exception e)
    {
        System.out.println(e.getMessage());
               
    }*/
    this.switchDisplayable(null, new GPSCanvas(this));
}
//<editor-fold defaultstate="collapsed" desc=" Generated Getter: selectGPSCMD ">//GEN-BEGIN:|297-getter|0|297-preInit
/**
 * Returns an initiliazed instance of selectGPSCMD component.
 * @return the initialized component instance
 */
public Command getSelectGPSCMD() {
    if (selectGPSCMD == null) {//GEN-END:|297-getter|0|297-preInit
        // write pre-init user code here
        selectGPSCMD = new Command("Select GPS", Command.ITEM, 0);//GEN-LINE:|297-getter|1|297-postInit
        // write post-init user code here
    }//GEN-BEGIN:|297-getter|2|
    return selectGPSCMD;
}
//</editor-fold>//GEN-END:|297-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: InformationAlert ">//GEN-BEGIN:|303-getter|0|303-preInit
/**
 * Returns an initiliazed instance of InformationAlert component.
 * @return the initialized component instance
 */
public Alert getInformationAlert() {
    if (InformationAlert == null) {//GEN-END:|303-getter|0|303-preInit
        // write pre-init user code here
        InformationAlert = new Alert("Information", null, null, AlertType.INFO);//GEN-BEGIN:|303-getter|1|303-postInit
        InformationAlert.setTimeout(Alert.FOREVER);//GEN-END:|303-getter|1|303-postInit
        // write post-init user code here
    }//GEN-BEGIN:|303-getter|2|
    return InformationAlert;
}
//</editor-fold>//GEN-END:|303-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: detailForm ">//GEN-BEGIN:|305-getter|0|305-preInit
/**
 * Returns an initiliazed instance of detailForm component.
 * @return the initialized component instance
 */
public Form getDetailForm() {
    if (detailForm == null) {//GEN-END:|305-getter|0|305-preInit
        // write pre-init user code here
        detailForm = new Form(Locale.get("TravelDetails"), new Item[] { getStringItem1(), getStringItem3(), getStringItem4(), getStringItem5(), getStringItem6(), getStringItem14(), getStringItem7(), getStringItem8(), getDetailsGroup(), getStringItem9(), getStringItem10(), getStringItem11(), getStringItem12(), getStringItem13(), getStagesChoiceGroup(), getUserChoiceGroup() });//GEN-BEGIN:|305-getter|1|305-postInit
        detailForm.addCommand(getBackCommand());
        detailForm.addCommand(getBookCommand());
        detailForm.setCommandListener(this);//GEN-END:|305-getter|1|305-postInit
        // write post-init user code here
    }//GEN-BEGIN:|305-getter|2|
    return detailForm;
}
//</editor-fold>//GEN-END:|305-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem1 ">//GEN-BEGIN:|307-getter|0|307-preInit
/**
 * Returns an initiliazed instance of stringItem1 component.
 * @return the initialized component instance
 */
public StringItem getStringItem1() {
    if (stringItem1 == null) {//GEN-END:|307-getter|0|307-preInit
        // write pre-init user code here
        stringItem1 = new StringItem(Locale.get("Departure"), null);//GEN-BEGIN:|307-getter|1|307-postInit
        stringItem1.setItemCommandListener(this);//GEN-END:|307-getter|1|307-postInit
        // write post-init user code here
    }//GEN-BEGIN:|307-getter|2|
    return stringItem1;
}
//</editor-fold>//GEN-END:|307-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem3 ">//GEN-BEGIN:|308-getter|0|308-preInit
/**
 * Returns an initiliazed instance of stringItem3 component.
 * @return the initialized component instance
 */
public StringItem getStringItem3() {
    if (stringItem3 == null) {//GEN-END:|308-getter|0|308-preInit
        // write pre-init user code here
        stringItem3 = new StringItem(Locale.get("Destination"), null);//GEN-LINE:|308-getter|1|308-postInit
        // write post-init user code here
    }//GEN-BEGIN:|308-getter|2|
    return stringItem3;
}
//</editor-fold>//GEN-END:|308-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem4 ">//GEN-BEGIN:|309-getter|0|309-preInit
/**
 * Returns an initiliazed instance of stringItem4 component.
 * @return the initialized component instance
 */
public StringItem getStringItem4() {
    if (stringItem4 == null) {//GEN-END:|309-getter|0|309-preInit
        // write pre-init user code here
        stringItem4 = new StringItem(Locale.get("Date"), null);//GEN-LINE:|309-getter|1|309-postInit
        // write post-init user code here
    }//GEN-BEGIN:|309-getter|2|
    return stringItem4;
}
//</editor-fold>//GEN-END:|309-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem5 ">//GEN-BEGIN:|310-getter|0|310-preInit
/**
 * Returns an initiliazed instance of stringItem5 component.
 * @return the initialized component instance
 */
public StringItem getStringItem5() {
    if (stringItem5 == null) {//GEN-END:|310-getter|0|310-preInit
        // write pre-init user code here
        stringItem5 = new StringItem(Locale.get("Time"), null);//GEN-LINE:|310-getter|1|310-postInit
        // write post-init user code here
    }//GEN-BEGIN:|310-getter|2|
    return stringItem5;
}
//</editor-fold>//GEN-END:|310-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem6 ">//GEN-BEGIN:|311-getter|0|311-preInit
/**
 * Returns an initiliazed instance of stringItem6 component.
 * @return the initialized component instance
 */
public StringItem getStringItem6() {
    if (stringItem6 == null) {//GEN-END:|311-getter|0|311-preInit
        // write pre-init user code here
        stringItem6 = new StringItem(Locale.get("Cost"), null);//GEN-LINE:|311-getter|1|311-postInit
        // write post-init user code here
    }//GEN-BEGIN:|311-getter|2|
    return stringItem6;
}
//</editor-fold>//GEN-END:|311-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem7 ">//GEN-BEGIN:|312-getter|0|312-preInit
/**
 * Returns an initiliazed instance of stringItem7 component.
 * @return the initialized component instance
 */
public StringItem getStringItem7() {
    if (stringItem7 == null) {//GEN-END:|312-getter|0|312-preInit
        // write pre-init user code here
        stringItem7 = new StringItem(Locale.get("OfferedBy"), "");//GEN-LINE:|312-getter|1|312-postInit
        // write post-init user code here
    }//GEN-BEGIN:|312-getter|2|
    return stringItem7;
}
//</editor-fold>//GEN-END:|312-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: detailsGroup ">//GEN-BEGIN:|315-getter|0|315-preInit
/**
 * Returns an initiliazed instance of detailsGroup component.
 * @return the initialized component instance
 */
public ChoiceGroup getDetailsGroup() {
    if (detailsGroup == null) {//GEN-END:|315-getter|0|315-preInit
        // write pre-init user code here
        detailsGroup = new ChoiceGroup("", Choice.MULTIPLE);//GEN-BEGIN:|315-getter|1|315-postInit
        detailsGroup.append(Locale.get("AcceptSmokers"), null);
        detailsGroup.append(Locale.get("Accomplished"), null);
        detailsGroup.append(Locale.get("Draft"), null);
        detailsGroup.append(Locale.get("Booked"), null);
        detailsGroup.append(Locale.get("inFavorite"), null);
        detailsGroup.append(Locale.get("Offered"), null);
        detailsGroup.append(Locale.get("License"), null);
        detailsGroup.setSelectedFlags(new boolean[] { false, false, false, false, false, false, false });
        detailsGroup.setFont(0, null);
        detailsGroup.setFont(1, null);
        detailsGroup.setFont(2, null);
        detailsGroup.setFont(3, null);
        detailsGroup.setFont(4, null);
        detailsGroup.setFont(5, null);
        detailsGroup.setFont(6, null);//GEN-END:|315-getter|1|315-postInit
        // write post-init user code here
        detailsGroup.append(Locale.get("RepetitionFrequency"), null);
    }//GEN-BEGIN:|315-getter|2|
    return detailsGroup;
}
//</editor-fold>//GEN-END:|315-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem8 ">//GEN-BEGIN:|323-getter|0|323-preInit
/**
 * Returns an initiliazed instance of stringItem8 component.
 * @return the initialized component instance
 */
public StringItem getStringItem8() {
    if (stringItem8 == null) {//GEN-END:|323-getter|0|323-preInit
        // write pre-init user code here
        stringItem8 = new StringItem(Locale.get("FeedbackPoint"), null);//GEN-LINE:|323-getter|1|323-postInit
        // write post-init user code here
    }//GEN-BEGIN:|323-getter|2|
    return stringItem8;
}
//</editor-fold>//GEN-END:|323-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem9 ">//GEN-BEGIN:|324-getter|0|324-preInit
/**
 * Returns an initiliazed instance of stringItem9 component.
 * @return the initialized component instance
 */
public StringItem getStringItem9() {
    if (stringItem9 == null) {//GEN-END:|324-getter|0|324-preInit
        // write pre-init user code here
        stringItem9 = new StringItem(Locale.get("Deviation"), null);//GEN-LINE:|324-getter|1|324-postInit
        // write post-init user code here
    }//GEN-BEGIN:|324-getter|2|
    return stringItem9;
}
//</editor-fold>//GEN-END:|324-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem10 ">//GEN-BEGIN:|325-getter|0|325-preInit
/**
 * Returns an initiliazed instance of stringItem10 component.
 * @return the initialized component instance
 */
public StringItem getStringItem10() {
    if (stringItem10 == null) {//GEN-END:|325-getter|0|325-preInit
        // write pre-init user code here
        stringItem10 = new StringItem(Locale.get("Notes"), null);//GEN-LINE:|325-getter|1|325-postInit
        // write post-init user code here
    }//GEN-BEGIN:|325-getter|2|
    return stringItem10;
}
//</editor-fold>//GEN-END:|325-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem11 ">//GEN-BEGIN:|326-getter|0|326-preInit
/**
 * Returns an initiliazed instance of stringItem11 component.
 * @return the initialized component instance
 */
public StringItem getStringItem11() {
    if (stringItem11 == null) {//GEN-END:|326-getter|0|326-preInit
        // write pre-init user code here
        stringItem11 = new StringItem(Locale.get("RealBudget"), null);//GEN-LINE:|326-getter|1|326-postInit
        // write post-init user code here
    }//GEN-BEGIN:|326-getter|2|
    return stringItem11;
}
//</editor-fold>//GEN-END:|326-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem12 ">//GEN-BEGIN:|327-getter|0|327-preInit
/**
 * Returns an initiliazed instance of stringItem12 component.
 * @return the initialized component instance
 */
public StringItem getStringItem12() {
    if (stringItem12 == null) {//GEN-END:|327-getter|0|327-preInit
        // write pre-init user code here
        stringItem12 = new StringItem(Locale.get("RealTime"), null);//GEN-LINE:|327-getter|1|327-postInit
        // write post-init user code here
    }//GEN-BEGIN:|327-getter|2|
    return stringItem12;
}
//</editor-fold>//GEN-END:|327-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem13 ">//GEN-BEGIN:|328-getter|0|328-preInit
/**
 * Returns an initiliazed instance of stringItem13 component.
 * @return the initialized component instance
 */
public StringItem getStringItem13() {
    if (stringItem13 == null) {//GEN-END:|328-getter|0|328-preInit
        // write pre-init user code here
        stringItem13 = new StringItem(Locale.get("Expiration"), null);//GEN-LINE:|328-getter|1|328-postInit
        // write post-init user code here
    }//GEN-BEGIN:|328-getter|2|
    return stringItem13;
}
//</editor-fold>//GEN-END:|328-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stagesChoiceGroup ">//GEN-BEGIN:|331-getter|0|331-preInit
/**
 * Returns an initiliazed instance of stagesChoiceGroup component.
 * @return the initialized component instance
 */
public ChoiceGroup getStagesChoiceGroup() {
    if (stagesChoiceGroup == null) {//GEN-END:|331-getter|0|331-preInit
        // write pre-init user code here
        stagesChoiceGroup = new ChoiceGroup(Locale.get("Stages"), Choice.EXCLUSIVE);//GEN-LINE:|331-getter|1|331-postInit
        // write post-init user code here
    }//GEN-BEGIN:|331-getter|2|
    return stagesChoiceGroup;
}
//</editor-fold>//GEN-END:|331-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Items ">//GEN-BEGIN:|17-itemCommandAction|0|17-preItemCommandAction
/**
 * Called by a system to indicated that a command has been invoked on a particular item.
 * @param command the Command that was invoked
 * @param displayable the Item where the command was invoked
 */
public void commandAction(Command command, Item item) {//GEN-END:|17-itemCommandAction|0|17-preItemCommandAction
   try{ // write pre-action user code here
       if (item == ownerStringItem) {//GEN-BEGIN:|17-itemCommandAction|1|406-preAction
           if (command == profileCMD) {//GEN-END:|17-itemCommandAction|1|406-preAction
            /*
switchDisplayable (null, getWaitScreen1 ());//GEN-LINE:|17-itemCommandAction|2|406-postAction
             profile=null;
             */
             w.getProfile(IDSession, ""+t.getUserId());
           }//GEN-BEGIN:|17-itemCommandAction|3|17-postItemCommandAction
       }//GEN-END:|17-itemCommandAction|3|17-postItemCommandAction
   }catch(LOAException e)
   {
       ShowError(Locale.get("Error") + " " + e.getMessage());
   }
}//GEN-BEGIN:|17-itemCommandAction|4|
//</editor-fold>//GEN-END:|17-itemCommandAction|4|


//<editor-fold defaultstate="collapsed" desc=" Generated Getter: getunreadCMD ">//GEN-BEGIN:|343-getter|0|343-preInit
/**
 * Returns an initiliazed instance of getunreadCMD component.
 * @return the initialized component instance
 */
public Command getGetunreadCMD() {
    if (getunreadCMD == null) {//GEN-END:|343-getter|0|343-preInit
        // write pre-init user code here
        getunreadCMD = new Command(Locale.get("GetUnreadMsg"), Command.ITEM, 0);//GEN-LINE:|343-getter|1|343-postInit
        // write post-init user code here
    }//GEN-BEGIN:|343-getter|2|
    return getunreadCMD;
}
//</editor-fold>//GEN-END:|343-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: getreadedCMD ">//GEN-BEGIN:|345-getter|0|345-preInit
/**
 * Returns an initiliazed instance of getreadedCMD component.
 * @return the initialized component instance
 */
public Command getGetreadedCMD() {
    if (getreadedCMD == null) {//GEN-END:|345-getter|0|345-preInit
        // write pre-init user code here
        getreadedCMD = new Command(Locale.get("GetReadMsg"), Locale.get("GetReadedMsg"), Command.ITEM, 0);//GEN-LINE:|345-getter|1|345-postInit
        // write post-init user code here
    }//GEN-BEGIN:|345-getter|2|
    return getreadedCMD;
}
//</editor-fold>//GEN-END:|345-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: getallMsgCMD ">//GEN-BEGIN:|347-getter|0|347-preInit
/**
 * Returns an initiliazed instance of getallMsgCMD component.
 * @return the initialized component instance
 */
public Command getGetallMsgCMD() {
    if (getallMsgCMD == null) {//GEN-END:|347-getter|0|347-preInit
        // write pre-init user code here
        getallMsgCMD = new Command(Locale.get("GetAllMsg"), Command.ITEM, 0);//GEN-LINE:|347-getter|1|347-postInit
        // write post-init user code here
    }//GEN-BEGIN:|347-getter|2|
    return getallMsgCMD;
}
//</editor-fold>//GEN-END:|347-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: sendCMD ">//GEN-BEGIN:|349-getter|0|349-preInit
/**
 * Returns an initiliazed instance of sendCMD component.
 * @return the initialized component instance
 */
public Command getSendCMD() {
    if (sendCMD == null) {//GEN-END:|349-getter|0|349-preInit
        // write pre-init user code here
        sendCMD = new Command(Locale.get("SendMsg"), Command.ITEM, 0);//GEN-LINE:|349-getter|1|349-postInit
        // write post-init user code here
    }//GEN-BEGIN:|349-getter|2|
    return sendCMD;
}
//</editor-fold>//GEN-END:|349-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: replayCMD ">//GEN-BEGIN:|351-getter|0|351-preInit
/**
 * Returns an initiliazed instance of replayCMD component.
 * @return the initialized component instance
 */
public Command getReplayCMD() {
    if (replayCMD == null) {//GEN-END:|351-getter|0|351-preInit
        // write pre-init user code here
        replayCMD = new Command(Locale.get("Replay"), Command.ITEM, 0);//GEN-LINE:|351-getter|1|351-postInit
        // write post-init user code here
    }//GEN-BEGIN:|351-getter|2|
    return replayCMD;
}
//</editor-fold>//GEN-END:|351-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: viewMsgCMD ">//GEN-BEGIN:|355-getter|0|355-preInit
/**
 * Returns an initiliazed instance of viewMsgCMD component.
 * @return the initialized component instance
 */
public Command getViewMsgCMD() {
    if (viewMsgCMD == null) {//GEN-END:|355-getter|0|355-preInit
        // write pre-init user code here
        viewMsgCMD = new Command(Locale.get("ViewMessage"), Command.ITEM, 0);//GEN-LINE:|355-getter|1|355-postInit
        // write post-init user code here
    }//GEN-BEGIN:|355-getter|2|
    return viewMsgCMD;
}
//</editor-fold>//GEN-END:|355-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: showMessageForm ">//GEN-BEGIN:|338-getter|0|338-preInit
/**
 * Returns an initiliazed instance of showMessageForm component.
 * @return the initialized component instance
 */
public Form getShowMessageForm() {
    if (showMessageForm == null) {//GEN-END:|338-getter|0|338-preInit
        // write pre-init user code here
        showMessageForm = new Form(Locale.get("Messages"), new Item[] { getUnreadedMsgList(), getReadedMsgList() });//GEN-BEGIN:|338-getter|1|338-postInit
        showMessageForm.addCommand(getBackCommand());
        showMessageForm.addCommand(getGetunreadCMD());
        showMessageForm.addCommand(getGetallMsgCMD());
        showMessageForm.addCommand(getSendCMD());
        showMessageForm.addCommand(sentCMD);
        showMessageForm.addCommand(getViewMsgCMD());
        showMessageForm.setCommandListener(this);//GEN-END:|338-getter|1|338-postInit
        // write post-init user code here
    }//GEN-BEGIN:|338-getter|2|
    return showMessageForm;
}
//</editor-fold>//GEN-END:|338-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: unreadedMsgList ">//GEN-BEGIN:|339-getter|0|339-preInit
/**
 * Returns an initiliazed instance of unreadedMsgList component.
 * @return the initialized component instance
 */
public ChoiceGroup getUnreadedMsgList() {
    if (unreadedMsgList == null) {//GEN-END:|339-getter|0|339-preInit
        // write pre-init user code here
        unreadedMsgList = new ChoiceGroup(Locale.get("Unreaded"), Choice.MULTIPLE);//GEN-LINE:|339-getter|1|339-postInit
        // write post-init user code here
    }//GEN-BEGIN:|339-getter|2|
    return unreadedMsgList;
}
//</editor-fold>//GEN-END:|339-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: readedMsgList ">//GEN-BEGIN:|340-getter|0|340-preInit
/**
 * Returns an initiliazed instance of readedMsgList component.
 * @return the initialized component instance
 */
public ChoiceGroup getReadedMsgList() {
    if (readedMsgList == null) {//GEN-END:|340-getter|0|340-preInit
        // write pre-init user code here
        readedMsgList = new ChoiceGroup(Locale.get("Readed"), Choice.MULTIPLE);//GEN-LINE:|340-getter|1|340-postInit
        // write post-init user code here
    }//GEN-BEGIN:|340-getter|2|
    return readedMsgList;
}
//</editor-fold>//GEN-END:|340-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: addFavoriteCMD ">//GEN-BEGIN:|357-getter|0|357-preInit
/**
 * Returns an initiliazed instance of addFavoriteCMD component.
 * @return the initialized component instance
 */
public Command getAddFavoriteCMD() {
    if (addFavoriteCMD == null) {//GEN-END:|357-getter|0|357-preInit
        // write pre-init user code here
        addFavoriteCMD = new Command(Locale.get("AddFavorite"), Command.ITEM, 0);//GEN-LINE:|357-getter|1|357-postInit
        // write post-init user code here
    }//GEN-BEGIN:|357-getter|2|
    return addFavoriteCMD;
}
//</editor-fold>//GEN-END:|357-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: insertChoice ">//GEN-BEGIN:|359-getter|0|359-preInit
/**
 * Returns an initiliazed instance of insertChoice component.
 * @return the initialized component instance
 */
public ChoiceGroup getInsertChoice() {
    if (insertChoice == null) {//GEN-END:|359-getter|0|359-preInit
        // write pre-init user code here
        insertChoice = new ChoiceGroup(Locale.get("Options"), Choice.MULTIPLE);//GEN-BEGIN:|359-getter|1|359-postInit
        insertChoice.append(Locale.get("License"), null);
        insertChoice.append(Locale.get("AcceptSmokers"), null);
        insertChoice.append(Locale.get("RepetitionFrequency"), null);
        insertChoice.append(Locale.get("Draft"), null);
        insertChoice.setSelectedFlags(new boolean[] { false, false, false, false });
        insertChoice.setFont(0, null);
        insertChoice.setFont(1, null);
        insertChoice.setFont(2, null);
        insertChoice.setFont(3, null);//GEN-END:|359-getter|1|359-postInit
        // write post-init user code here
    }//GEN-BEGIN:|359-getter|2|
    return insertChoice;
}
//</editor-fold>//GEN-END:|359-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: expirationDateField ">//GEN-BEGIN:|363-getter|0|363-preInit
/**
 * Returns an initiliazed instance of expirationDateField component.
 * @return the initialized component instance
 */
public DateField getExpirationDateField() {
    if (expirationDateField == null) {//GEN-END:|363-getter|0|363-preInit
        // write pre-init user code here
        expirationDateField = new DateField(Locale.get("Expiration"), DateField.DATE_TIME);//GEN-BEGIN:|363-getter|1|363-postInit
        expirationDateField.setDate(new java.util.Date(System.currentTimeMillis()));//GEN-END:|363-getter|1|363-postInit
        // write post-init user code here
    }//GEN-BEGIN:|363-getter|2|
    return expirationDateField;
}
//</editor-fold>//GEN-END:|363-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: notesTextField ">//GEN-BEGIN:|365-getter|0|365-preInit
/**
 * Returns an initiliazed instance of notesTextField component.
 * @return the initialized component instance
 */
public TextField getNotesTextField() {
    if (notesTextField == null) {//GEN-END:|365-getter|0|365-preInit
        // write pre-init user code here
        notesTextField = new TextField(Locale.get("Notes"), null, 255, TextField.ANY);//GEN-LINE:|365-getter|1|365-postInit
        // write post-init user code here
    }//GEN-BEGIN:|365-getter|2|
    return notesTextField;
}
//</editor-fold>//GEN-END:|365-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: extimatedTextField ">//GEN-BEGIN:|366-getter|0|366-preInit
/**
 * Returns an initiliazed instance of extimatedTextField component.
 * @return the initialized component instance
 */
public TextField getExtimatedTextField() {
    if (extimatedTextField == null) {//GEN-END:|366-getter|0|366-preInit
        // write pre-init user code here
        extimatedTextField = new TextField(Locale.get("ExtimatedTime"), "60", 32, TextField.NUMERIC);//GEN-LINE:|366-getter|1|366-postInit
        // write post-init user code here
    }//GEN-BEGIN:|366-getter|2|
    return extimatedTextField;
}
//</editor-fold>//GEN-END:|366-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: sendMsgCMD ">//GEN-BEGIN:|373-getter|0|373-preInit
/**
 * Returns an initiliazed instance of sendMsgCMD component.
 * @return the initialized component instance
 */
public Command getSendMsgCMD() {
    if (sendMsgCMD == null) {//GEN-END:|373-getter|0|373-preInit
        // write pre-init user code here
        sendMsgCMD = new Command(Locale.get("SendMessage"), Command.ITEM, 0);//GEN-LINE:|373-getter|1|373-postInit
        // write post-init user code here
    }//GEN-BEGIN:|373-getter|2|
    return sendMsgCMD;
}
//</editor-fold>//GEN-END:|373-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: msgForm ">//GEN-BEGIN:|367-getter|0|367-preInit
/**
 * Returns an initiliazed instance of msgForm component.
 * @return the initialized component instance
 */
public Form getMsgForm() {
    if (msgForm == null) {//GEN-END:|367-getter|0|367-preInit
        // write pre-init user code here
        msgForm = new Form(Locale.get("Message"), new Item[] { getReceiverdTextField(), getTitleTextField(), getTextTextField(), getMsgChoiceGroup() });//GEN-BEGIN:|367-getter|1|367-postInit
        msgForm.addCommand(getBackCommand());
        msgForm.addCommand(getSendMsgCMD());
        msgForm.setCommandListener(this);//GEN-END:|367-getter|1|367-postInit
        // write post-init user code here
    }//GEN-BEGIN:|367-getter|2|
    return msgForm;
}
//</editor-fold>//GEN-END:|367-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: receiverdTextField ">//GEN-BEGIN:|368-getter|0|368-preInit
/**
 * Returns an initiliazed instance of receiverdTextField component.
 * @return the initialized component instance
 */
public TextField getReceiverdTextField() {
    if (receiverdTextField == null) {//GEN-END:|368-getter|0|368-preInit
        // write pre-init user code here
        receiverdTextField = new TextField(Locale.get("Receivers"), null, 50, TextField.ANY);//GEN-LINE:|368-getter|1|368-postInit
        // write post-init user code here
    }//GEN-BEGIN:|368-getter|2|
    return receiverdTextField;
}
//</editor-fold>//GEN-END:|368-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: titleTextField ">//GEN-BEGIN:|369-getter|0|369-preInit
/**
 * Returns an initiliazed instance of titleTextField component.
 * @return the initialized component instance
 */
public TextField getTitleTextField() {
    if (titleTextField == null) {//GEN-END:|369-getter|0|369-preInit
        // write pre-init user code here
        titleTextField = new TextField(Locale.get("Title"), null, 60, TextField.ANY);//GEN-LINE:|369-getter|1|369-postInit
        // write post-init user code here
    }//GEN-BEGIN:|369-getter|2|
    return titleTextField;
}
//</editor-fold>//GEN-END:|369-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: textTextField ">//GEN-BEGIN:|370-getter|0|370-preInit
/**
 * Returns an initiliazed instance of textTextField component.
 * @return the initialized component instance
 */
public TextField getTextTextField() {
    if (textTextField == null) {//GEN-END:|370-getter|0|370-preInit
        // write pre-init user code here
        textTextField = new TextField(Locale.get("Text"), null, 2048, TextField.ANY);//GEN-LINE:|370-getter|1|370-postInit
        // write post-init user code here
    }//GEN-BEGIN:|370-getter|2|
    return textTextField;
}
//</editor-fold>//GEN-END:|370-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: replayItemCommand ">//GEN-BEGIN:|384-getter|0|384-preInit
/**
 * Returns an initiliazed instance of replayItemCommand component.
 * @return the initialized component instance
 */
public Command getReplayItemCommand() {
    if (replayItemCommand == null) {//GEN-END:|384-getter|0|384-preInit
        // write pre-init user code here
        replayItemCommand = new Command(Locale.get("Replay"), Command.ITEM, 0);//GEN-LINE:|384-getter|1|384-postInit
        // write post-init user code here
    }//GEN-BEGIN:|384-getter|2|
    return replayItemCommand;
}
//</editor-fold>//GEN-END:|384-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: viewMsgForm ">//GEN-BEGIN:|376-getter|0|376-preInit
/**
 * Returns an initiliazed instance of viewMsgForm component.
 * @return the initialized component instance
 */
public Form getViewMsgForm() {
    if (viewMsgForm == null) {//GEN-END:|376-getter|0|376-preInit
        // write pre-init user code here
        viewMsgForm = new Form(Locale.get("Message"), new Item[] { getSenderStringItem(), getReceiversStringItem(), getTitleStringItem(), getTextStringItem() });//GEN-BEGIN:|376-getter|1|376-postInit
        viewMsgForm.addCommand(getBackCommand());
        viewMsgForm.addCommand(getReplayItemCommand());
        viewMsgForm.setCommandListener(this);//GEN-END:|376-getter|1|376-postInit
        // write post-init user code here
    }//GEN-BEGIN:|376-getter|2|
    return viewMsgForm;
}
//</editor-fold>//GEN-END:|376-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: senderStringItem ">//GEN-BEGIN:|377-getter|0|377-preInit
/**
 * Returns an initiliazed instance of senderStringItem component.
 * @return the initialized component instance
 */
public StringItem getSenderStringItem() {
    if (senderStringItem == null) {//GEN-END:|377-getter|0|377-preInit
        // write pre-init user code here
        senderStringItem = new StringItem(Locale.get("Sender"), null);//GEN-LINE:|377-getter|1|377-postInit
        // write post-init user code here
    }//GEN-BEGIN:|377-getter|2|
    return senderStringItem;
}
//</editor-fold>//GEN-END:|377-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: receiversStringItem ">//GEN-BEGIN:|378-getter|0|378-preInit
/**
 * Returns an initiliazed instance of receiversStringItem component.
 * @return the initialized component instance
 */
public StringItem getReceiversStringItem() {
    if (receiversStringItem == null) {//GEN-END:|378-getter|0|378-preInit
        // write pre-init user code here
        receiversStringItem = new StringItem(Locale.get("Receivers"), null);//GEN-LINE:|378-getter|1|378-postInit
        // write post-init user code here
    }//GEN-BEGIN:|378-getter|2|
    return receiversStringItem;
}
//</editor-fold>//GEN-END:|378-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: titleStringItem ">//GEN-BEGIN:|379-getter|0|379-preInit
/**
 * Returns an initiliazed instance of titleStringItem component.
 * @return the initialized component instance
 */
public StringItem getTitleStringItem() {
    if (titleStringItem == null) {//GEN-END:|379-getter|0|379-preInit
        // write pre-init user code here
        titleStringItem = new StringItem(Locale.get("Title"), null);//GEN-LINE:|379-getter|1|379-postInit
        // write post-init user code here
    }//GEN-BEGIN:|379-getter|2|
    return titleStringItem;
}
//</editor-fold>//GEN-END:|379-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: textStringItem ">//GEN-BEGIN:|380-getter|0|380-preInit
/**
 * Returns an initiliazed instance of textStringItem component.
 * @return the initialized component instance
 */
public StringItem getTextStringItem() {
    if (textStringItem == null) {//GEN-END:|380-getter|0|380-preInit
        // write pre-init user code here
        textStringItem = new StringItem(Locale.get("Text"), null);//GEN-LINE:|380-getter|1|380-postInit
        // write post-init user code here
    }//GEN-BEGIN:|380-getter|2|
    return textStringItem;
}
//</editor-fold>//GEN-END:|380-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: emailTextField ">//GEN-BEGIN:|389-getter|0|389-preInit
/**
 * Returns an initiliazed instance of emailTextField component.
 * @return the initialized component instance
 */
public TextField getEmailTextField() {
    if (emailTextField == null) {//GEN-END:|389-getter|0|389-preInit
        // write pre-init user code here
        emailTextField = new TextField(Locale.get("Email"), "", 32, TextField.EMAILADDR);//GEN-LINE:|389-getter|1|389-postInit
        // write post-init user code here
    }//GEN-BEGIN:|389-getter|2|
    return emailTextField;
}
//</editor-fold>//GEN-END:|389-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: ageTextField ">//GEN-BEGIN:|390-getter|0|390-preInit
/**
 * Returns an initiliazed instance of ageTextField component.
 * @return the initialized component instance
 */
public TextField getAgeTextField() {
    if (ageTextField == null) {//GEN-END:|390-getter|0|390-preInit
        // write pre-init user code here
        ageTextField = new TextField(Locale.get("Age"), "", 32, TextField.NUMERIC);//GEN-LINE:|390-getter|1|390-postInit
        // write post-init user code here
    }//GEN-BEGIN:|390-getter|2|
    return ageTextField;
}
//</editor-fold>//GEN-END:|390-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField ">//GEN-BEGIN:|391-getter|0|391-preInit
/**
 * Returns an initiliazed instance of textField component.
 * @return the initialized component instance
 */
public TextField getTextField() {
    if (textField == null) {//GEN-END:|391-getter|0|391-preInit
        // write pre-init user code here
        textField = new TextField(Locale.get("City"), "", 32, TextField.ANY);//GEN-LINE:|391-getter|1|391-postInit
        // write post-init user code here
    }//GEN-BEGIN:|391-getter|2|
    return textField;
}
//</editor-fold>//GEN-END:|391-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: profileChoiceGroup ">//GEN-BEGIN:|392-getter|0|392-preInit
/**
 * Returns an initiliazed instance of profileChoiceGroup component.
 * @return the initialized component instance
 */
public ChoiceGroup getProfileChoiceGroup() {
    if (profileChoiceGroup == null) {//GEN-END:|392-getter|0|392-preInit
        // write pre-init user code here
        profileChoiceGroup = new ChoiceGroup(Locale.get("Options"), Choice.MULTIPLE);//GEN-BEGIN:|392-getter|1|392-postInit
        profileChoiceGroup.append(Locale.get("DrivingLicense"), null);
        profileChoiceGroup.setFitPolicy(Choice.TEXT_WRAP_DEFAULT);
        profileChoiceGroup.setSelectedFlags(new boolean[] { false });
        profileChoiceGroup.setFont(0, null);//GEN-END:|392-getter|1|392-postInit
        // write post-init user code here
    }//GEN-BEGIN:|392-getter|2|
    return profileChoiceGroup;
}
//</editor-fold>//GEN-END:|392-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: phoneTextField ">//GEN-BEGIN:|394-getter|0|394-preInit
/**
 * Returns an initiliazed instance of phoneTextField component.
 * @return the initialized component instance
 */
public TextField getPhoneTextField() {
    if (phoneTextField == null) {//GEN-END:|394-getter|0|394-preInit
        // write pre-init user code here
        phoneTextField = new TextField(Locale.get("Phone"), "", 32, TextField.ANY);//GEN-LINE:|394-getter|1|394-postInit
        // write post-init user code here
    }//GEN-BEGIN:|394-getter|2|
    return phoneTextField;
}
//</editor-fold>//GEN-END:|394-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: genderChoiceGroup ">//GEN-BEGIN:|395-getter|0|395-preInit
/**
 * Returns an initiliazed instance of genderChoiceGroup component.
 * @return the initialized component instance
 */
public ChoiceGroup getGenderChoiceGroup() {
    if (genderChoiceGroup == null) {//GEN-END:|395-getter|0|395-preInit
        // write pre-init user code here
        genderChoiceGroup = new ChoiceGroup(Locale.get("Gender"), Choice.POPUP);//GEN-BEGIN:|395-getter|1|395-postInit
        genderChoiceGroup.append(Locale.get("Unknown"), null);
        genderChoiceGroup.append(Locale.get("Male"), null);
        genderChoiceGroup.append(Locale.get("Female"), null);
        genderChoiceGroup.setSelectedFlags(new boolean[] { false, false, false });
        genderChoiceGroup.setFont(0, null);
        genderChoiceGroup.setFont(1, null);
        genderChoiceGroup.setFont(2, null);//GEN-END:|395-getter|1|395-postInit
        // write post-init user code here
    }//GEN-BEGIN:|395-getter|2|
    return genderChoiceGroup;
}
//</editor-fold>//GEN-END:|395-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: smokerChoiceGroup ">//GEN-BEGIN:|399-getter|0|399-preInit
/**
 * Returns an initiliazed instance of smokerChoiceGroup component.
 * @return the initialized component instance
 */
public ChoiceGroup getSmokerChoiceGroup() {
    if (smokerChoiceGroup == null) {//GEN-END:|399-getter|0|399-preInit
        // write pre-init user code here
        smokerChoiceGroup = new ChoiceGroup(Locale.get("Smoker"), Choice.POPUP);//GEN-BEGIN:|399-getter|1|399-postInit
        smokerChoiceGroup.append(Locale.get("Unknown"), null);
        smokerChoiceGroup.append(Locale.get("Smoker"), null);
        smokerChoiceGroup.append(Locale.get("NotSmoker"), null);
        smokerChoiceGroup.setSelectedFlags(new boolean[] { false, false, false });
        smokerChoiceGroup.setFont(0, null);
        smokerChoiceGroup.setFont(1, null);
        smokerChoiceGroup.setFont(2, null);//GEN-END:|399-getter|1|399-postInit
        // write post-init user code here
    }//GEN-BEGIN:|399-getter|2|
    return smokerChoiceGroup;
}
//</editor-fold>//GEN-END:|399-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: bithTextField ">//GEN-BEGIN:|403-getter|0|403-preInit
/**
 * Returns an initiliazed instance of bithTextField component.
 * @return the initialized component instance
 */
public TextField getBithTextField() {
    if (bithTextField == null) {//GEN-END:|403-getter|0|403-preInit
        // write pre-init user code here
        bithTextField = new TextField(Locale.get("Birthday"), null, 32, TextField.ANY);//GEN-LINE:|403-getter|1|403-postInit
        // write post-init user code here
    }//GEN-BEGIN:|403-getter|2|
    return bithTextField;
}
//</editor-fold>//GEN-END:|403-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: msgChoiceGroup ">//GEN-BEGIN:|408-getter|0|408-preInit
/**
 * Returns an initiliazed instance of msgChoiceGroup component.
 * @return the initialized component instance
 */
public ChoiceGroup getMsgChoiceGroup() {
    if (msgChoiceGroup == null) {//GEN-END:|408-getter|0|408-preInit
        // write pre-init user code here
        msgChoiceGroup = new ChoiceGroup("", Choice.MULTIPLE);//GEN-BEGIN:|408-getter|1|408-postInit
        msgChoiceGroup.append(Locale.get("Prioritary"), null);
        msgChoiceGroup.setSelectedFlags(new boolean[] { false });
        msgChoiceGroup.setFont(0, null);//GEN-END:|408-getter|1|408-postInit
        // write post-init user code here
    }//GEN-BEGIN:|408-getter|2|
    return msgChoiceGroup;
}
//</editor-fold>//GEN-END:|408-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: sentMsg ">//GEN-BEGIN:|413-getter|0|413-preInit
/**
 * Returns an initiliazed instance of sentMsg component.
 * @return the initialized component instance
 */
public List getSentMsg() {
    if (sentMsg == null) {//GEN-END:|413-getter|0|413-preInit
        // write pre-init user code here
        sentMsg = new List(Locale.get("SentMessages"), Choice.IMPLICIT);//GEN-BEGIN:|413-getter|1|413-postInit
        sentMsg.addCommand(getBackCommand());
        sentMsg.setCommandListener(this);//GEN-END:|413-getter|1|413-postInit
        // write post-init user code here
    }//GEN-BEGIN:|413-getter|2|
    return sentMsg;
}
//</editor-fold>//GEN-END:|413-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: sentMsgAction ">//GEN-BEGIN:|413-action|0|413-preAction
/**
 * Performs an action assigned to the selected list element in the sentMsg component.
 */
public void sentMsgAction() {//GEN-END:|413-action|0|413-preAction
    // enter pre-action user code here
    String __selectedString = getSentMsg().getString(getSentMsg().getSelectedIndex());//GEN-LINE:|413-action|1|413-postAction
    // enter post-action user code here
    index=getSentMsg().getSelectedIndex();
    Message m=(Message)sent.elementAt(index);
    showMessage(m);
    switchDisplayable(null, getViewMsgForm());
}//GEN-BEGIN:|413-action|2|
//</editor-fold>//GEN-END:|413-action|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: notificationAlert ">//GEN-BEGIN:|419-getter|0|419-preInit
/**
 * Returns an initiliazed instance of notificationAlert component.
 * @return the initialized component instance
 */
public Alert getNotificationAlert() {
    if (notificationAlert == null) {//GEN-END:|419-getter|0|419-preInit
        // write pre-init user code here
        notificationAlert = new Alert(Locale.get("NotificationList"));//GEN-BEGIN:|419-getter|1|419-postInit
        notificationAlert.setTimeout(Alert.FOREVER);//GEN-END:|419-getter|1|419-postInit
        // write post-init user code here
    }//GEN-BEGIN:|419-getter|2|
    return notificationAlert;
}
//</editor-fold>//GEN-END:|419-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: friendList ">//GEN-BEGIN:|420-getter|0|420-preInit
/**
 * Returns an initiliazed instance of friendList component.
 * @return the initialized component instance
 */
public List getFriendList() {
    if (friendList == null) {//GEN-END:|420-getter|0|420-preInit
        // write pre-init user code here
        friendList = new List(Locale.get("FriendList"), Choice.IMPLICIT);//GEN-BEGIN:|420-getter|1|420-postInit
        friendList.addCommand(getBackCommand());
        friendList.addCommand(getAddFriendCMD());
        friendList.addCommand(getRemoveFriendCMD());
        friendList.addCommand(getBanCMD());
        friendList.addCommand(getViewBannedCMD());
        friendList.addCommand(getFriendshipCMD());
        friendList.addCommand(getRequestCMD());
        friendList.setCommandListener(this);//GEN-END:|420-getter|1|420-postInit
        // write post-init user code here
    }//GEN-BEGIN:|420-getter|2|
    return friendList;
}
//</editor-fold>//GEN-END:|420-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: friendListAction ">//GEN-BEGIN:|420-action|0|420-preAction
/**
 * Performs an action assigned to the selected list element in the friendList component.
 */
public void friendListAction() {//GEN-END:|420-action|0|420-preAction
    // enter pre-action user code here
    String __selectedString = getFriendList().getString(getFriendList().getSelectedIndex());//GEN-LINE:|420-action|1|420-postAction
    index=getFriendList().getSelectedIndex();
    UserProfile m=(UserProfile)buddy.elementAt(index);
    try{
        w.getProfile(IDSession, ""+m.getId());
    }catch(Exception e)
    {
        ShowError(e.getMessage());
    }
}//GEN-BEGIN:|420-action|2|
//</editor-fold>//GEN-END:|420-action|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: addFriendCMD ">//GEN-BEGIN:|425-getter|0|425-preInit
/**
 * Returns an initiliazed instance of addFriendCMD component.
 * @return the initialized component instance
 */
public Command getAddFriendCMD() {
    if (addFriendCMD == null) {//GEN-END:|425-getter|0|425-preInit
        // write pre-init user code here
        addFriendCMD = new Command(Locale.get("Add")+" "+Locale.get("Friend"), Command.ITEM, 0);//GEN-LINE:|425-getter|1|425-postInit
        // write post-init user code here
    }//GEN-BEGIN:|425-getter|2|
    return addFriendCMD;
}
//</editor-fold>//GEN-END:|425-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: removeFriendCMD ">//GEN-BEGIN:|427-getter|0|427-preInit
/**
 * Returns an initiliazed instance of removeFriendCMD component.
 * @return the initialized component instance
 */
public Command getRemoveFriendCMD() {
    if (removeFriendCMD == null) {//GEN-END:|427-getter|0|427-preInit
        // write pre-init user code here
        removeFriendCMD = new Command(Locale.get("Remove")+" "+Locale.get("Friend"), Command.ITEM, 0);//GEN-LINE:|427-getter|1|427-postInit
        // write post-init user code here
    }//GEN-BEGIN:|427-getter|2|
    return removeFriendCMD;
}
//</editor-fold>//GEN-END:|427-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: banCMD ">//GEN-BEGIN:|429-getter|0|429-preInit
/**
 * Returns an initiliazed instance of banCMD component.
 * @return the initialized component instance
 */
public Command getBanCMD() {
    if (banCMD == null) {//GEN-END:|429-getter|0|429-preInit
        // write pre-init user code here
        banCMD = new Command(Locale.get("Ban")+" "+Locale.get("Friend"), Command.ITEM, 0);//GEN-LINE:|429-getter|1|429-postInit
        // write post-init user code here
    }//GEN-BEGIN:|429-getter|2|
    return banCMD;
}
//</editor-fold>//GEN-END:|429-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: viewBannedCMD ">//GEN-BEGIN:|431-getter|0|431-preInit
/**
 * Returns an initiliazed instance of viewBannedCMD component.
 * @return the initialized component instance
 */
public Command getViewBannedCMD() {
    if (viewBannedCMD == null) {//GEN-END:|431-getter|0|431-preInit
        // write pre-init user code here
        viewBannedCMD = new Command(Locale.get("BannedList"), Command.ITEM, 0);//GEN-LINE:|431-getter|1|431-postInit
        // write post-init user code here
    }//GEN-BEGIN:|431-getter|2|
    return viewBannedCMD;
}
//</editor-fold>//GEN-END:|431-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: vehicleChoiceGroup ">//GEN-BEGIN:|433-getter|0|433-preInit
/**
 * Returns an initiliazed instance of vehicleChoiceGroup component.
 * @return the initialized component instance
 */
public ChoiceGroup getVehicleChoiceGroup() {
    if (vehicleChoiceGroup == null) {//GEN-END:|433-getter|0|433-preInit
        // write pre-init user code here
        vehicleChoiceGroup = new ChoiceGroup(Locale.get("Vehicle"), Choice.POPUP);//GEN-LINE:|433-getter|1|433-postInit
        // write post-init user code here
    }//GEN-BEGIN:|433-getter|2|
    return vehicleChoiceGroup;
}
//</editor-fold>//GEN-END:|433-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: itemCommand ">//GEN-BEGIN:|437-getter|0|437-preInit
/**
 * Returns an initiliazed instance of itemCommand component.
 * @return the initialized component instance
 */
public Command getItemCommand() {
    if (itemCommand == null) {//GEN-END:|437-getter|0|437-preInit
        // write pre-init user code here
        itemCommand = new Command(Locale.get("Select"), Command.ITEM, 0);//GEN-LINE:|437-getter|1|437-postInit
        // write post-init user code here
    }//GEN-BEGIN:|437-getter|2|
    return itemCommand;
}
//</editor-fold>//GEN-END:|437-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: geoList ">//GEN-BEGIN:|434-getter|0|434-preInit
/**
 * Returns an initiliazed instance of geoList component.
 * @return the initialized component instance
 */
public List getGeoList() {
    if (geoList == null) {//GEN-END:|434-getter|0|434-preInit
        // write pre-init user code here
        geoList = new List(Locale.get("SelectAddress"), Choice.IMPLICIT);//GEN-BEGIN:|434-getter|1|434-postInit
        geoList.addCommand(getItemCommand());
        geoList.setCommandListener(this);//GEN-END:|434-getter|1|434-postInit
        // write post-init user code here
    }//GEN-BEGIN:|434-getter|2|
    return geoList;
}
//</editor-fold>//GEN-END:|434-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: geoListAction ">//GEN-BEGIN:|434-action|0|434-preAction
/**
 * Performs an action assigned to the selected list element in the geoList component.
 */
public void geoListAction() {//GEN-END:|434-action|0|434-preAction
    // enter pre-action user code here
    String __selectedString = getGeoList().getString(getGeoList().getSelectedIndex());//GEN-LINE:|434-action|1|434-postAction
    // enter post-action user code here
}//GEN-BEGIN:|434-action|2|
//</editor-fold>//GEN-END:|434-action|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: userChoiceGroup ">//GEN-BEGIN:|439-getter|0|439-preInit
/**
 * Returns an initiliazed instance of userChoiceGroup component.
 * @return the initialized component instance
 */
public ChoiceGroup getUserChoiceGroup() {
    if (userChoiceGroup == null) {//GEN-END:|439-getter|0|439-preInit
        // write pre-init user code here
        userChoiceGroup = new ChoiceGroup(Locale.get("ReservatesUsers"), Choice.MULTIPLE);//GEN-LINE:|439-getter|1|439-postInit
        // write post-init user code here
    }//GEN-BEGIN:|439-getter|2|
    return userChoiceGroup;
}
//</editor-fold>//GEN-END:|439-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem14 ">//GEN-BEGIN:|440-getter|0|440-preInit
/**
 * Returns an initiliazed instance of stringItem14 component.
 * @return the initialized component instance
 */
public StringItem getStringItem14() {
    if (stringItem14 == null) {//GEN-END:|440-getter|0|440-preInit
        // write pre-init user code here
        stringItem14 = new StringItem(Locale.get("ExtimatedTime"), null);//GEN-LINE:|440-getter|1|440-postInit
        // write post-init user code here
    }//GEN-BEGIN:|440-getter|2|
    return stringItem14;
}
//</editor-fold>//GEN-END:|440-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: deviationTextField ">//GEN-BEGIN:|441-getter|0|441-preInit
/**
 * Returns an initiliazed instance of deviationTextField component.
 * @return the initialized component instance
 */
public TextField getDeviationTextField() {
    if (deviationTextField == null) {//GEN-END:|441-getter|0|441-preInit
        // write pre-init user code here
        deviationTextField = new TextField(Locale.get("Deviation"), "5", 32, TextField.NUMERIC);//GEN-LINE:|441-getter|1|441-postInit
        // write post-init user code here
    }//GEN-BEGIN:|441-getter|2|
    return deviationTextField;
}
//</editor-fold>//GEN-END:|441-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: extimatedBudgetTextField ">//GEN-BEGIN:|442-getter|0|442-preInit
/**
 * Returns an initiliazed instance of extimatedBudgetTextField component.
 * @return the initialized component instance
 */
public TextField getExtimatedBudgetTextField() {
    if (extimatedBudgetTextField == null) {//GEN-END:|442-getter|0|442-preInit
        // write pre-init user code here
        extimatedBudgetTextField = new TextField(Locale.get("ExtimatedBudget"), "10", 32, TextField.DECIMAL);//GEN-LINE:|442-getter|1|442-postInit
        // write post-init user code here
    }//GEN-BEGIN:|442-getter|2|
    return extimatedBudgetTextField;
}
//</editor-fold>//GEN-END:|442-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: bookForm ">//GEN-BEGIN:|445-getter|0|445-preInit
/**
 * Returns an initiliazed instance of bookForm component.
 * @return the initialized component instance
 */
public Form getBookForm() {
    if (bookForm == null) {//GEN-END:|445-getter|0|445-preInit
        // write pre-init user code here
        bookForm = new Form(Locale.get("Book"), new Item[] { getBook1TextField(), getBook2TextField(), getBook3TextField() });//GEN-BEGIN:|445-getter|1|445-postInit
        bookForm.addCommand(getBackCommand());
        bookForm.addCommand(getBookCommand());
        bookForm.setCommandListener(this);//GEN-END:|445-getter|1|445-postInit
        // write post-init user code here
    }//GEN-BEGIN:|445-getter|2|
    return bookForm;
}
//</editor-fold>//GEN-END:|445-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: book1TextField ">//GEN-BEGIN:|447-getter|0|447-preInit
/**
 * Returns an initiliazed instance of book1TextField component.
 * @return the initialized component instance
 */
public TextField getBook1TextField() {
    if (book1TextField == null) {//GEN-END:|447-getter|0|447-preInit
        // write pre-init user code here
        book1TextField = new TextField(Locale.get("Deviation"), null, 4, TextField.NUMERIC);//GEN-LINE:|447-getter|1|447-postInit
        // write post-init user code here
    }//GEN-BEGIN:|447-getter|2|
    return book1TextField;
}
//</editor-fold>//GEN-END:|447-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: book2TextField ">//GEN-BEGIN:|448-getter|0|448-preInit
/**
 * Returns an initiliazed instance of book2TextField component.
 * @return the initialized component instance
 */
public TextField getBook2TextField() {
    if (book2TextField == null) {//GEN-END:|448-getter|0|448-preInit
        // write pre-init user code here
        book2TextField = new TextField(Locale.get("Seats"), null, 5, TextField.NUMERIC);//GEN-LINE:|448-getter|1|448-postInit
        // write post-init user code here
    }//GEN-BEGIN:|448-getter|2|
    return book2TextField;
}
//</editor-fold>//GEN-END:|448-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: book3TextField ">//GEN-BEGIN:|459-getter|0|459-preInit
/**
 * Returns an initiliazed instance of book3TextField component.
 * @return the initialized component instance
 */
public TextField getBook3TextField() {
    if (book3TextField == null) {//GEN-END:|459-getter|0|459-preInit
        // write pre-init user code here
        book3TextField = new TextField(Locale.get("Notes"), null, 255, TextField.ANY);//GEN-LINE:|459-getter|1|459-postInit
        // write post-init user code here
    }//GEN-BEGIN:|459-getter|2|
    return book3TextField;
}
//</editor-fold>//GEN-END:|459-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand2 ">//GEN-BEGIN:|463-getter|0|463-preInit
/**
 * Returns an initiliazed instance of backCommand2 component.
 * @return the initialized component instance
 */
public Command getBackCommand2() {
    if (backCommand2 == null) {//GEN-END:|463-getter|0|463-preInit
        // write pre-init user code here
        backCommand2 = new Command("Back", Command.BACK, 0);//GEN-LINE:|463-getter|1|463-postInit
        // write post-init user code here
    }//GEN-BEGIN:|463-getter|2|
    return backCommand2;
}
//</editor-fold>//GEN-END:|463-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: unBanCommand ">//GEN-BEGIN:|467-getter|0|467-preInit
/**
 * Returns an initiliazed instance of unBanCommand component.
 * @return the initialized component instance
 */
public Command getUnBanCommand() {
    if (unBanCommand == null) {//GEN-END:|467-getter|0|467-preInit
        // write pre-init user code here
        unBanCommand = new Command(Locale.get("UnBan"), Command.ITEM, 0);//GEN-LINE:|467-getter|1|467-postInit
        // write post-init user code here
    }//GEN-BEGIN:|467-getter|2|
    return unBanCommand;
}
//</editor-fold>//GEN-END:|467-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: bannedList ">//GEN-BEGIN:|460-getter|0|460-preInit
/**
 * Returns an initiliazed instance of bannedList component.
 * @return the initialized component instance
 */
public List getBannedList() {
    if (bannedList == null) {//GEN-END:|460-getter|0|460-preInit
        // write pre-init user code here
        bannedList = new List(Locale.get("BannedList"), Choice.EXCLUSIVE);//GEN-BEGIN:|460-getter|1|460-postInit
        bannedList.addCommand(getBackCommand());
        bannedList.addCommand(getUnBanCommand());
        bannedList.setCommandListener(this);//GEN-END:|460-getter|1|460-postInit
        // write post-init user code here
    }//GEN-BEGIN:|460-getter|2|
    return bannedList;
}
//</editor-fold>//GEN-END:|460-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: bannedListAction ">//GEN-BEGIN:|460-action|0|460-preAction
/**
 * Performs an action assigned to the selected list element in the bannedList component.
 */
public void bannedListAction() {//GEN-END:|460-action|0|460-preAction
    // enter pre-action user code here
    String __selectedString = getBannedList().getString(getBannedList().getSelectedIndex());//GEN-LINE:|460-action|1|460-postAction
    // enter post-action user code here
}//GEN-BEGIN:|460-action|2|
//</editor-fold>//GEN-END:|460-action|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: itemCommand2 ">//GEN-BEGIN:|477-getter|0|477-preInit
/**
 * Returns an initiliazed instance of itemCommand2 component.
 * @return the initialized component instance
 */
public Command getItemCommand2() {
    if (itemCommand2 == null) {//GEN-END:|477-getter|0|477-preInit
        // write pre-init user code here
        itemCommand2 = new Command("Item", Command.ITEM, 0);//GEN-LINE:|477-getter|1|477-postInit
        // write post-init user code here
    }//GEN-BEGIN:|477-getter|2|
    return itemCommand2;
}
//</editor-fold>//GEN-END:|477-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: acceptFriendCMD ">//GEN-BEGIN:|482-getter|0|482-preInit
/**
 * Returns an initiliazed instance of acceptFriendCMD component.
 * @return the initialized component instance
 */
public Command getAcceptFriendCMD() {
    if (acceptFriendCMD == null) {//GEN-END:|482-getter|0|482-preInit
        // write pre-init user code here
        acceptFriendCMD = new Command(Locale.get("AcceptFriend"), Command.ITEM, 0);//GEN-LINE:|482-getter|1|482-postInit
        // write post-init user code here
    }//GEN-BEGIN:|482-getter|2|
    return acceptFriendCMD;
}
//</editor-fold>//GEN-END:|482-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: denyFriendCMD ">//GEN-BEGIN:|484-getter|0|484-preInit
/**
 * Returns an initiliazed instance of denyFriendCMD component.
 * @return the initialized component instance
 */
public Command getDenyFriendCMD() {
    if (denyFriendCMD == null) {//GEN-END:|484-getter|0|484-preInit
        // write pre-init user code here
        denyFriendCMD = new Command(Locale.get("DenyFriend"), Command.ITEM, 0);//GEN-LINE:|484-getter|1|484-postInit
        // write post-init user code here
    }//GEN-BEGIN:|484-getter|2|
    return denyFriendCMD;
}
//</editor-fold>//GEN-END:|484-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: friendNotificationList ">//GEN-BEGIN:|469-getter|0|469-preInit
/**
 * Returns an initiliazed instance of friendNotificationList component.
 * @return the initialized component instance
 */
public List getFriendNotificationList() {
    if (friendNotificationList == null) {//GEN-END:|469-getter|0|469-preInit
        // write pre-init user code here
        friendNotificationList = new List(Locale.get("FriendNotification"), Choice.EXCLUSIVE);//GEN-BEGIN:|469-getter|1|469-postInit
        friendNotificationList.addCommand(getBackCommand());
        friendNotificationList.addCommand(getAcceptFriendCMD());
        friendNotificationList.addCommand(getDenyFriendCMD());
        friendNotificationList.setCommandListener(this);//GEN-END:|469-getter|1|469-postInit
        // write post-init user code here
    }//GEN-BEGIN:|469-getter|2|
    return friendNotificationList;
}
//</editor-fold>//GEN-END:|469-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: friendNotificationListAction ">//GEN-BEGIN:|469-action|0|469-preAction
/**
 * Performs an action assigned to the selected list element in the friendNotificationList component.
 */
public void friendNotificationListAction() {//GEN-END:|469-action|0|469-preAction
    // enter pre-action user code here
    String __selectedString = getFriendNotificationList().getString(getFriendNotificationList().getSelectedIndex());//GEN-LINE:|469-action|1|469-postAction
    // enter post-action user code here
}//GEN-BEGIN:|469-action|2|
//</editor-fold>//GEN-END:|469-action|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: friendRequestList ">//GEN-BEGIN:|472-getter|0|472-preInit
/**
 * Returns an initiliazed instance of friendRequestList component.
 * @return the initialized component instance
 */
public List getFriendRequestList() {
    if (friendRequestList == null) {//GEN-END:|472-getter|0|472-preInit
        // write pre-init user code here
        friendRequestList = new List(Locale.get("FriendRequest"), Choice.EXCLUSIVE);//GEN-BEGIN:|472-getter|1|472-postInit
        friendRequestList.addCommand(getBackCommand());
        friendRequestList.setCommandListener(this);//GEN-END:|472-getter|1|472-postInit
        // write post-init user code here
    }//GEN-BEGIN:|472-getter|2|
    return friendRequestList;
}
//</editor-fold>//GEN-END:|472-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Method: friendRequestListAction ">//GEN-BEGIN:|472-action|0|472-preAction
/**
 * Performs an action assigned to the selected list element in the friendRequestList component.
 */
public void friendRequestListAction() {//GEN-END:|472-action|0|472-preAction
    // enter pre-action user code here
    String __selectedString = getFriendRequestList().getString(getFriendRequestList().getSelectedIndex());//GEN-LINE:|472-action|1|472-postAction
    // enter post-action user code here
}//GEN-BEGIN:|472-action|2|
//</editor-fold>//GEN-END:|472-action|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: friendshipCMD ">//GEN-BEGIN:|486-getter|0|486-preInit
/**
 * Returns an initiliazed instance of friendshipCMD component.
 * @return the initialized component instance
 */
public Command getFriendshipCMD() {
    if (friendshipCMD == null) {//GEN-END:|486-getter|0|486-preInit
        // write pre-init user code here
        friendshipCMD = new Command(Locale.get("FriendNotification"), Command.ITEM, 0);//GEN-LINE:|486-getter|1|486-postInit
        // write post-init user code here
    }//GEN-BEGIN:|486-getter|2|
    return friendshipCMD;
}
//</editor-fold>//GEN-END:|486-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: requestCMD ">//GEN-BEGIN:|489-getter|0|489-preInit
/**
 * Returns an initiliazed instance of requestCMD component.
 * @return the initialized component instance
 */
public Command getRequestCMD() {
    if (requestCMD == null) {//GEN-END:|489-getter|0|489-preInit
        // write pre-init user code here
        requestCMD = new Command(Locale.get("FriendRequest"), Command.ITEM, 0);//GEN-LINE:|489-getter|1|489-postInit
        // write post-init user code here
    }//GEN-BEGIN:|489-getter|2|
    return requestCMD;
}
//</editor-fold>//GEN-END:|489-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: addFriendForm ">//GEN-BEGIN:|492-getter|0|492-preInit
/**
 * Returns an initiliazed instance of addFriendForm component.
 * @return the initialized component instance
 */
public Form getAddFriendForm() {
    if (addFriendForm == null) {//GEN-END:|492-getter|0|492-preInit
        // write pre-init user code here
        addFriendForm = new Form(Locale.get("AddFriend"), new Item[] { getFriendTextField() });//GEN-BEGIN:|492-getter|1|492-postInit
        addFriendForm.addCommand(getBackCommand());
        addFriendForm.addCommand(getAddFriendCMD());
        addFriendForm.setCommandListener(this);//GEN-END:|492-getter|1|492-postInit
        // write post-init user code here
    }//GEN-BEGIN:|492-getter|2|
    return addFriendForm;
}
//</editor-fold>//GEN-END:|492-getter|2|

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: friendTextField ">//GEN-BEGIN:|493-getter|0|493-preInit
/**
 * Returns an initiliazed instance of friendTextField component.
 * @return the initialized component instance
 */
public TextField getFriendTextField() {
    if (friendTextField == null) {//GEN-END:|493-getter|0|493-preInit
        // write pre-init user code here
        friendTextField = new TextField(Locale.get("Username"), null, 32, TextField.ANY);//GEN-LINE:|493-getter|1|493-postInit
        // write post-init user code here
    }//GEN-BEGIN:|493-getter|2|
    return friendTextField;
}
//</editor-fold>//GEN-END:|493-getter|2|








String IDSession=null;
    /**
     * Returns a display instance.
     * @return the display instance.
     */
    public Display getDisplay () {
        return Display.getDisplay(this);
    }

    /**
     * Exits MIDlet.
     */
    public void exitMIDlet() {
        switchDisplayable (null, null);
        destroyApp(true);
        notifyDestroyed();
    }

    /**
     * Called when MIDlet is started.
     * Checks whether the MIDlet have been already started and initialize/starts or resumes the MIDlet.
     */
    public void startApp() {
        if (midletPaused) {
            resumeMIDlet ();
        } else {
            initialize ();
            startMIDlet ();
        }
        midletPaused = false;
    }

    /**
     * Called when MIDlet is paused.
     */
    public void pauseApp() {
        midletPaused = true;
    }

    /**
     * Called to signal the MIDlet to terminate.
     * @param unconditional if true, then the MIDlet has to be unconditionally terminated and all resources has to be released.
     */
    public void destroyApp(boolean unconditional) 
    {
    }
    Vector veicoli=null;
    public void setVehicleList(VehicleList l)
    {
        veicoli=l.results;
        this.getVehicleChoiceGroup().deleteAll();
        for(int i=0;i<veicoli.size();i++)
        {
            Vehicle v=(Vehicle)veicoli.elementAt(i);
            this.getVehicleChoiceGroup().append(v.getModel()+" "+v.getVehicleClass()+" "+v.getSeats(), null);
        }
        switchDisplayable(null, getInsertForm());
    }
    public void insertSearchResult(SearchResult res)
    {
        results=res;
        this.getResultList().deleteAll();
        for(int i=0;i<res.getList().size();i++)
                {
                    Travel t=(Travel)res.getList().elementAt(i);
                    resultList.append(Locale.get("From")+" "+t.getCityFrom()+" "+Locale.get("To")+" "+t.getCityTo()+" "+Locale.get("Date")+" "+t.getDate(), null);
                }
    }
    SearchResult booked=null;
    public void insertBookedResult(SearchResult res)
    {
        System.out.println("inserimento booked");
        booked=res;
        this.bookedtravel=getBookedtravel();
        bookedtravel.deleteAll();
        bookedtravel.setTitle(Locale.get("Booked"));
        for(int i=0;i<res.getList().size();i++)
                {
                    Travel t=(Travel)res.getList().elementAt(i);
                    
                    this.bookedtravel.append(Locale.get("From")+" "+t.getCityFrom()+" "+Locale.get("To")+" "+t.getCityTo()+" "+Locale.get("Date")+" "+t.getDate(), null);
                }
        this.switchDisplayable(null, bookedtravel);
    }
    public void insertOfferedResult(SearchResult res)
    {
        System.out.println("inserimento booked");
        booked=res;
        this.bookedtravel=getBookedtravel();
        bookedtravel.deleteAll();
        bookedtravel.setTitle(Locale.get("Offered"));
        for(int i=0;i<res.getList().size();i++)
                {
                    Travel t=(Travel)res.getList().elementAt(i);
                    
                    this.bookedtravel.append(Locale.get("From")+" "+t.getCityFrom()+" "+Locale.get("To")+" "+t.getCityTo()+" "+Locale.get("Date")+" "+t.getDate(), null);
                }
        this.switchDisplayable(null, bookedtravel);
    }
    public void insertFavoriteResult(SearchResult res)
    {
        System.out.println("inserimento favorite");
        booked=res;
        this.bookedtravel=getBookedtravel();
        bookedtravel.deleteAll();
        bookedtravel.setTitle(Locale.get("Favorites"));
        for(int i=0;i<res.getList().size();i++)
                {
                    Travel t=(Travel)res.getList().elementAt(i);
                    
                    this.bookedtravel.append(Locale.get("From")+" "+t.getCityFrom()+" "+Locale.get("To")+" "+t.getCityTo()+" "+Locale.get("Date")+" "+t.getDate(), null);
                }
        this.switchDisplayable(null, bookedtravel);
    }
    public void updateProfile(UserProfile up)
    {
        profile=up;
        if(profileForm==null)//si controlla che non sia già instanziato
            profileForm=getProfileForm();
        //update field
            getUsernameTextField().setString(profile.getUsername());
            getNameTextField().setString(profile.getName());
            getSurnameTextField().setString(profile.getSurname());
            this.getAddressTextField().setString(profile.getAddress());
            this.getAgeTextField().setString(""+profile.getAge());
            this.getCityTextField().setString(profile.getCity());
            this.getEmailTextField().setString(profile.getEmail());
            this.getBithTextField().setString(profile.getBirthdate());
            this.getProfileChoiceGroup().setSelectedIndex(0, profile.isLicense());
            index=0;
            if(profile.getSmoker().equals(Locale.get("Smoker")))
                index=1;
            if(profile.getSmoker().equals(Locale.get("NotSmoker")))
                index=2;        
            this.getSmokerChoiceGroup().setSelectedIndex(index, true);
            index=0;
            if(profile.getGender().equals(Locale.get("Male")))
                index=1;
            if(profile.getGender().equals(Locale.get("Female")))
                index=2;        
            this.getGenderChoiceGroup().setSelectedIndex(index, true);
            
        switchDisplayable(null,profileForm);
    }
    public void finalizeLogin (String api_key,UserProfile up) throws LOAException{
        IDSession=api_key;
        w.getNotificationList(api_key);
        userID=up.getId();
        getHomeList().setTitle(Locale.get("Wellcome")+" "+up.getUsername());
        if(IDSession!=null)
        {
            switchDisplayable(null, this.getHomeList());
            //commandAction(waitScreen.SUCCESS_COMMAND, waitScreen);
        }else //commandAction(waitScreen.FAILURE_COMMAND, waitScreen);
            switchDisplayable(loginErrorAlert, loginForm);
        this.profile=up;
    }

    public void locationUpdated(LocationProvider arg0, Locazione arg1) {
        System.out.println("location Update"+arg1.toString());
    }

    public void providerStateChanged(LocationProvider arg0, int arg1) {
        System.out.println("state changed");
        //throw new UnsupportedOperationException("Not supported yet.");
    }
    public void tripBooked()
    {
        Alert a=this.getInformationAlert();
        a.setString(Locale.get("Booked"));
        this.switchDisplayable(a, this.getTravelForm());
    }
    public void tripInserted()
    {
        Alert a=this.getInformationAlert();
        a.setString(Locale.get("Inserted"));
        this.switchDisplayable(a, this.getHomeList());
    }
    public void ShowError(String err)
    {
        Alert a=this.getInformationAlert();
        a.setType(AlertType.ERROR);
        a.setString(err);
        this.switchDisplayable(a, this.getDisplay().getCurrent());
    }
    public void ShowMessage(String err)
    {
        Alert a=this.getInformationAlert();
        a.setType(AlertType.CONFIRMATION);
        a.setString(err);
        this.switchDisplayable(a, this.getDisplay().getCurrent());
    }
    public void showProfile(UserProfile p)
    {
        
    }
    public void updateTravel(KXmlParser p)throws Exception
    {
        t.update(p);
        Form f=this.getDetailForm();
        this.getStringItem1().setText(t.getFrom());
        this.getStringItem3().setText(t.getTo());
        this.getStringItem4().setText(t.getDate());
        this.getStringItem5().setText(t.getTime());
        this.getStringItem6().setText(""+t.getCost());
        this.getStringItem14().setText(""+t.getEstimatedTime());
        this.getStringItem7().setText(t.getOwner());
        this.getStringItem8().setText(""+t.getFeedbacks());
        this.getStringItem9().setText(""+t.getDeviationRadius());
        this.getStringItem10().setText(t.getNotes());
        this.getStringItem11().setText(""+t.getRealBudget());
        this.getStringItem12().setText(""+t.getRealTime());
        this.getStringItem13().setText(t.getReservationExpirationDate());
        boolean b[]=new boolean[8];
        b[0]=t.isAcceptSmokers();
        b[1]=t.isAccomplished();
        b[2]=t.isDraft();
        b[3]=t.isIsBooked();
        b[4]=t.isIsInFavorites();
        b[5]=t.isIsOffered();
        b[6]=t.isRequireLicensed();
        b[7]=t.isRepetition();
        this.getDetailsGroup().setSelectedFlags(b);
        Vector v=t.stages;
        for(int i=0;i<v.size();i++)
        {
            Stage t=(Stage)v.elementAt(i);
            this.getStagesChoiceGroup().append(Locale.get("From")+" "+t.getFrom()+" "+Locale.get("To")+" "+t.getTo(), null);
        }
        v=t.getReservatedUser();
        for(int i=0;i<v.size();i++)
        {
            UserProfile t=(UserProfile)v.elementAt(i);
            this.getUserChoiceGroup().append(Locale.get("Username")+" " +t.getUsername(), null);
        }
        this.switchDisplayable(null, f);
    }
    public void locationUpdated(org.j4me.bluetoothgps.LocationProvider arg0, org.j4me.bluetoothgps.Location arg1) {
        
    }
    public void unreadMsg(MessageList l)
    {
        Form f=this.getShowMessageForm();
        unread=l.results;
        getUnreadedMsgList().deleteAll();
        for(int i=0;i<unread.size();i++)
        {
            Message t=(Message)unread.elementAt(i);
            this.getUnreadedMsgList().append(Locale.get("Sender")+" "+t.getSender()+" "+Locale.get("Title")+" "+t.getTitle(), null);
        }
        this.switchDisplayable(null, f);
    }
    Vector readed,unread;
    public void allMsg(MessageList l)
    {
        Form f=this.getShowMessageForm();
        Vector v=l.results;
        getUnreadedMsgList().deleteAll();
        getReadedMsgList().deleteAll();
        unread=new Vector();
        readed=new Vector();
        for(int i=0;i<v.size();i++)
        {
            Message t=(Message)v.elementAt(i);
            if(!t.isRead()){
                this.getUnreadedMsgList().append(Locale.get("Sender")+" "+t.getSender()+" "+Locale.get("Title")+" "+t.getTitle(), null);
                unread.addElement(t);
            }else{ 
                this.getReadedMsgList().append(Locale.get("Sender")+" "+t.getSender()+" "+Locale.get("Title")+" "+t.getTitle(), null);
                readed.addElement(t);
            }
        }
        this.switchDisplayable(null, f);
    }
    public void sentMsg(MessageList l)
    {
        Vector v=l.results;
        sent=new Vector();
        List list=this.getSentMsg();
        list.deleteAll();
                for(int i=0;i<v.size();i++)
        {
            Message t=(Message)v.elementAt(i);
           
                list.append(Locale.get("Receivers")+" "+t.getReceivers()+" "+Locale.get("Title")+" "+t.getTitle(), null);
                sent.addElement(t);
        }
        this.switchDisplayable(null, list);
    }
    Vector buddy=null;
    Vector banned=null;
    public void buddyList(UserList l)
    {
        Vector v=l.results;
        buddy=new Vector();
        List list=this.getFriendList();
        list.deleteAll();
                for(int i=0;i<v.size();i++)
        {
            UserProfile t=(UserProfile)v.elementAt(i);
           
                list.append(t.getUsername()+" "+Locale.get("FeedbackPoint")+" "+t.getFeedback(), null);
                buddy.addElement(t);
        }
        this.switchDisplayable(null, list);
    }
    Vector sent=null;
    public void deletedMsg()
    {
        if(index!=-1)
        {
            if(this.unread.contains(m))
            {
                this.getUnreadedMsgList().delete(index);
                this.unread.removeElementAt(index);
            }else if(this.readed.contains(m))
            {
                this.getReadedMsgList().delete(index);
                this.readed.removeElementAt(index);
            }
        }
    }
    public void cancelledBook()
    {
        if(index!=-1){
            this.bookedtravel.delete(index);
            this.booked.getList().removeElementAt(index);
        }
    }
    
}
